From Documentation

(Difference between revisions)
Jump to: navigation, search
m (Encoding URLs)
m (Undo revision 18989 by Malta (talk))
 
(9 intermediate revisions not shown)
Line 1: Line 1:
{{ZKComponentReferencePageHeader}}
{{ZKComponentReferencePageHeader}}
 +
This section describes how to use the [[ZUML Reference/ZUML/Languages/XHTML|XHTML component set]] (i.e., XHTML components). XHTML components are in a different component set than [[ZUML Reference/ZUML/Languages/ZUL|ZUL components]]. You have to [[ZUML Reference/ZUML/Languages|specify XML namespace]] to distinguish them if you want to use them in the same ZUML document. For example,
-
All XHTML components are derived from <javadoc>org.zkoss.zhtml.impl.AbstractTag</javadoc>.
+
<source lang="xml">
-
 
+
<window xmlns:h="xhtml">
-
An XHTML component is a thin wrapper that encapsulates a native HTML tag. It is different to a XUL component or other none-native component in several ways.
+
    <h:ul>
-
 
+
        <h:li>Click <button/></h:li>
-
* By implementing the <javadoc type="interface">org.zkoss.zk.ui.ext.RawId</javadoc> interface, the universal identifier, <mp>getUuid</mp>, is the same as the identifier <mp>getId</mp>.
+
    </h:ul>
-
* By implementing the <javadoc type="interface">org.zkoss.zk.ui.ext.DynamicAttributes</javadoc> interface, all XHTML components support arbitrary attributes. In other words, any attribute name is legal (as long as the targeted browser supports).
+
</window>
-
 
+
-
=== Raw ===
+
-
 
+
-
A special component, <javadoc>org.zkoss.zhtml.Raw</javadoc> is used to represent any component that is not declared in the following section (i.e., not in lang.xml). In other words, if any unrecognized component name is found, an instance of <javadoc>org.zkoss.zhtml.Raw</javadoc> is created and a proper HTML tag will be generated accordingly. In other words, any component name is legal as long as the targeted browser supports.
+
-
 
+
-
<source lang="xml" >
+
-
<marquee align="top">...</marquee>
+
</source>
</source>
-
is equivalent to
+
Notice that the HTML component set is one of the approaches to use HTML tags directly in a ZUML document. In most cases, it is not the best approach. For information please refer to [[ZK Developer's Reference/UI Patterns/HTML Tags|ZK Developer's Reference: HTML tags]].
-
<source lang="java">
+
{{ZKComponentReferenceHeadingToc}}
-
new Raw().setDynamicAttribute("align", "top");
+
-
</source>
+
{{ZKComponentReferencePageFooter}}
{{ZKComponentReferencePageFooter}}

Latest revision as of 00:31, 16 June 2011






This section describes how to use the XHTML component set (i.e., XHTML components). XHTML components are in a different component set than ZUL components. You have to specify XML namespace to distinguish them if you want to use them in the same ZUML document. For example,

<window xmlns:h="xhtml">
    <h:ul>
        <h:li>Click <button/></h:li>
    </h:ul>
</window>

Notice that the HTML component set is one of the approaches to use HTML tags directly in a ZUML document. In most cases, it is not the best approach. For information please refer to ZK Developer's Reference: HTML tags.


Subsections:





Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.