In Pure Java"
Tmillsclare (talk | contribs) m (Created page with 'It is also possible to create XHTML components in Java. The XHTML components are mapped to classes by ZK which means you can implement something like this: <source lang="java"> …') |
Robertwenzel (talk | contribs) m (→Raw) |
||
(2 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
+ | {{ZKComponentReferencePageHeader}} | ||
+ | |||
It is also possible to create XHTML components in Java. The XHTML components are mapped to classes by ZK which means you can implement something like this: | It is also possible to create XHTML components in Java. The XHTML components are mapped to classes by ZK which means you can implement something like this: | ||
Line 5: | Line 7: | ||
</source> | </source> | ||
− | This enables you to use XHTML components from ZUL or within Java just like anything ZK related. Next | + | This enables you to use XHTML components from ZUL or within Java just like anything ZK related. If you need to output an XHTML component which is not present in ZK you can use the Raw object. |
+ | |||
+ | === 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> | ||
+ | |||
+ | is equivalent to | ||
+ | |||
+ | <source lang="java"> | ||
+ | new Raw("marquee").setDynamicProperty("align", "top"); | ||
+ | </source> | ||
+ | |||
+ | Next let's investigate the differences between XUL and XHTML components. | ||
+ | |||
+ | {{ZKComponentReferencePageFooter}} |
Latest revision as of 08:19, 24 July 2017
It is also possible to create XHTML components in Java. The XHTML components are mapped to classes by ZK which means you can implement something like this:
Td myTd = new Td();
This enables you to use XHTML components from ZUL or within Java just like anything ZK related. If you need to output an XHTML component which is not present in ZK you can use the Raw object.
Raw
A special component, Raw 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 Raw 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.
<marquee align="top">...</marquee>
is equivalent to
new Raw("marquee").setDynamicProperty("align", "top");
Next let's investigate the differences between XUL and XHTML components.