6. The ZK User Interface Markup Language

Table of Contents

XML
Elements Must Be Well-formed
Special Character Must Be Replaced
Attribute Values Must Be Specified and Quoted
Comments
Character Encoding
Namespace
Conditional Evaluation
Iterative Evaluation
The each Variable
The forEachStatus Variable
How to Use each and forEachStatus Variables in Event Listeners
Load on Demand
Load-on-Demand with the fulfill Attribute
Load-on-Demand with an Event Listener
Implicit Objects
List of Implicit Objects
Information about Request and Execution
Processing Instructions
The page Directive
The component Directive
The init Directive
The variable-resolver Directive
The import Directive
ZK Attributes
The apply Attribute
The use Attribute
The if Attribute
The unless Attribute
The forEach Attribute
The forEachBegin Attribute
The forEachEnd Attribute
The fulfill Attribute
The forward Attribute
ZK Elements
The zk Element
The zscript Element
The attribute Element
The variables element
The custom-attributes element
Component Sets and XML Namespaces
Standard Namespaces

The ZK User Interface Markup Language (ZUML) is based on XML. Each XML element describes what component to create. A XML attribute describes an initial values to be assigned to the created component. An XML processing instruction describes how to process the whole page, such as the page title.

Different sets of components are distinguished by XML namespaces. For example, the namespace of XUL is http://www.zkoss.org/2005/zul,[33] and that of XHTML is http://www.w3.org/1999/xhtml.



[33] It was called http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul. However , many non-XUL features are added, so it is better to use an independent namespace.