Use ZK JSP Tags instead of ZK Filter"

From Documentation
m (Created page with '{{ZKDevelopersGuidePageHeader}} The ZK filter actually maps each HTML tag to the corresponding XHTML components. As described in the previous section, it consumes more memory th…')
 
(No difference)

Revision as of 11:30, 2 September 2010

DocumentationZK Developer's ReferencePerformance TipsUse ZK JSP Tags instead of ZK Filter
Use ZK JSP Tags instead of ZK Filter


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


The ZK filter actually maps each HTML tag to the corresponding XHTML components. As described in the previous section, it consumes more memory than necessary since ZK has to maintain the states of all ZK components (including XUL and XHTML components).

ZK JSP tags are introduced to eliminate the need of the ZK filter for JSP pages. With ZK JSP tags, a ZUL component is created for each ZK JSP tag. All other HTML tags are encapsulated as a special component.

<!-- a JSP page -->
<z:page>
    <table>
        <tr>
            <td>Name</td>
            <td><z:textbox/></td>
        </tr>
    </table>
</z:page>

is equivalent to the following code snippet, if a ZUL page is used,

<!-- a ZUL page -->
<n:table xmlns:n="http://www.zkoss.org/2005/zk/native">
    <n:tr>
        <n:td>Name</n:td>
        <n:td>   <textbox/></n:td>
    </n:tr>
</n:table>



Last Update : 2010/09/02

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