Processing Instruction Tags

From Documentation
Revision as of 03:30, 26 November 2010 by Jumperchen (talk | contribs)


DocumentationZK JSP Tags EssentialsProcessing Instruction Tags
Processing Instruction Tags



This section outlines details on processing instruction tags.

The init Directive

In pure ZK document we can declare many kinds of processing instructions to define components, initiators and variable resolvers. These directives are also supported in ZK JSP Tags. The place to declare directives is outside the <zk:page> tags which should be put at the topmost of whole document. For example:

<zk:init .../>
<zk:component .../>
<zk:variable-resolver .../>
...
<zk:page>
...
</zk:page>

The variable-resolver Directive

<zk:init use="" [arg0=""] [arg0=""] [arg0=""] .../>

The init directive is the same as the ZK init directive. The deferent part is in JSP we don't use class attribute, we use the use attribute. The Java class represented by the use attribute must implement Initiator interface. The zscript attribute is not implemented yet. For more detailed information, please refer to ZK Developer's Guide.

The component Directive

<zk:component name="myName" macroURI="/mypath/my.zul"
  [prop1="value1"] [prop2="value2"].../>
<Zk:component name="myName" [class="myPackage.myClass"]
  [extends="existentName"] [moldName="myMoldName"] [moldURI="/myMoldURI"]
  [prop1="value1"] [prop2="value2"].../>

Defines a new component for a particular page. Components defined in this directive are visible to the pages which are declared in this JSP document. Defining components can be used in any page, please refer to ZK Language Addon, which is a XML file defining components for all pages in a Web Application.

The detailed information about component directive, please refer to the 6. Component Page Definition below.

The Unsupported Directives in ZK JSP

Currently unsupported directives are: import, link, xel-method, page. Some of them are not supported because JSP has already provided such features.



Last Update : 2010/11/26

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