Processing Instruction Tags"
Tmillsclare (talk | contribs) m (Created page with '{{ZKJSPTagsEssentialsPageHeader}} This section outlines details on processing instruction tags. {{ZKJSPTagsEssentialsHeadingToc}} {{ZKJSPTagsEssentialsPageFooter}}') |
Jumperchen (talk | contribs) |
||
Line 1: | Line 1: | ||
{{ZKJSPTagsEssentialsPageHeader}} | {{ZKJSPTagsEssentialsPageHeader}} | ||
+ | __TOC__ | ||
This section outlines details on 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: | ||
+ | |||
+ | <source lang="xml"> | ||
+ | |||
+ | <zk:init .../> | ||
+ | <zk:component .../> | ||
+ | <zk:variable-resolver .../> | ||
+ | ... | ||
+ | <zk:page> | ||
+ | ... | ||
+ | </zk:page> | ||
+ | |||
+ | </source> | ||
+ | =The variable-resolver Directive= | ||
+ | |||
+ | <source lang="xml"> | ||
+ | <zk:init use="" [arg0=""] [arg0=""] [arg0=""] .../> | ||
+ | </source> | ||
+ | |||
+ | 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 <javadoc>org.zkoss.zk.ui.util.Initiator</javadoc> interface. The ''zscript'' attribute is not | ||
+ | implemented yet. | ||
+ | For more detailed information, please refer to [[ZK_Developer's_Guide | ZK Developer's Guide]]. | ||
+ | |||
+ | =The component Directive= | ||
+ | |||
+ | <source lang="xml"> | ||
+ | |||
+ | <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"].../> | ||
+ | |||
+ | </source> | ||
+ | |||
+ | 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_Component_Development_Essentials/Creating_the_Configuration_Files/The_language-addon | 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 [[ZK_JSP_Tags_Essentials/Component_Page_Definition | 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. | ||
{{ZKJSPTagsEssentialsPageFooter}} | {{ZKJSPTagsEssentialsPageFooter}} |
Revision as of 03:30, 26 November 2010
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.