ZK User Interface Markup Language"

From Documentation
Line 29: Line 29:
 
*[http://books.zkoss.org/wiki/ZK_Developer%27s_Guide/Fundamental_ZK/ZK_User_Interface_Markup_Language/XML/Character_Encoding Character Encoding]
 
*[http://books.zkoss.org/wiki/ZK_Developer%27s_Guide/Fundamental_ZK/ZK_User_Interface_Markup_Language/XML/Character_Encoding Character Encoding]
  
==[[zscript]]==
+
==[http://books.zkoss.org/wiki/ZK_Developer%27s_Guide/Fundamental_ZK/ZK_User_Interface_Markup_Language/zscript zscript]==
*[[Zscript#Write_Java_code_in_ZUML | Write Java code in ZUML]]
+
*[http://books.zkoss.org/wiki/ZK_Developer%27s_Guide/Fundamental_ZK/ZK_User_Interface_Markup_Language/zscript/Write_Java_code_in_ZUML Write Java code in ZUML]
*[[Zscript#Hints_to_read_zscript | Hints to read zscript ]]
+
*[http://books.zkoss.org/wiki/ZK_Developer%27s_Guide/Fundamental_ZK/ZK_User_Interface_Markup_Language/zscript/Hints_to_read_zscript Hints to read zscript ]
*[[Zscript#Distinguish_zscript_from_EL | Distinguish zscript from EL ]]
+
*[http://books.zkoss.org/wiki/ZK_Developer%27s_Guide/Fundamental_ZK/ZK_User_Interface_Markup_Language/zscript//Distinguish_zscript_from_EL Distinguish zscript from EL ]
*[[Zscript#Java_Interpreter_.28BeanShell.29 | Java Interpreter (BeanShell) ]]
+
*[http://books.zkoss.org/wiki/ZK_Developer%27s_Guide/Fundamental_ZK/ZK_User_Interface_Markup_Language/zscript/Java_Interpreter_.28BeanShell.29 Java Interpreter (BeanShell) ]
*[[Zscript#zscript_other_than_Java | zscript other than Java ]]
+
*[http://books.zkoss.org/wiki/ZK_Developer%27s_Guide/Fundamental_ZK/ZK_User_Interface_Markup_Language/zscript/zscript_other_than_Java zscript other than Java ]
  
 
==[[ZUML_Implicit Objects|Implicit Objects]]==
 
==[[ZUML_Implicit Objects|Implicit Objects]]==

Revision as of 07:50, 22 July 2010

DocumentationZK Developer's GuideFundamental ZKZK User Interface Markup Language
ZK User Interface Markup Language


Stop.png This documentation is for an older version of ZK. For the latest one, please click here.


Overview

The ZK User Interface Markup Language (ZUML) is based on XML. ZUML file has filename extension : zul. Each ZK element instructs the ZK Loader which component to create. A ZK property describes an initial value to be assigned to the created component. A ZK processing instruction describes how to process the whole page, such as the page title.

Implicit Objects are much like global variables handled by system. You can use it to get information of system and client. Also, it's a way to pass information between pages. You'll find it really helpful in developing a web application.

Expresion Language let you access variables in intuitive way.

zscript let you write java code inside ZUML, for fast prototyping.

In section ZK Processing Instruction, we'll show how to use the most common directives to control page behavior, such like macro component.

In section ZK Attributes, we'll show attributes used to control the associated element, not just initializing the data member. It provides utilities like conditional evaluation(if), iterative evaluation(forEach), etc.

In section ZK Elements, we'll show useful elements that's not UI component, like zk element, zscript element.

After reading this chapter, you should be able to write your own ZUML pages easily.

XML

zscript

Implicit Objects

Expression Language (EL)

ZK Processing Instructions

Directives to control whole page behavior

Processing Instruction Name
Description
page Describes attributes of a page
component Defines a new component for a particular page

ZK Attributes

Act on component, such like conditional evaluation, iteration, load on demand.

Attribute Name
Description
if Conditional evaluation of an component
forEach, each Iterative evaluate component against a collection
use, apply Write event handling code in pure java file. apply support MVC pattern better.
forward Let centralized controller handle events.

ZK Elements

Helper component that's not UI. It helps to save variable, write java code in ZUML, and others.

Element Name
Description
zk Aggregate other components
zscript Write java code in ZUML
attribute Make the page more readable
variables Store variable in namespace scope
custom-attributes Store variables in different scopes

Component Sets and XML Namespaces



Last Update : 2010/07/22

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