In Pure Java

From Documentation

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.


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.

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