Use of ZK JSP Tags

From Documentation
Revision as of 10:39, 19 January 2022 by Hawk (talk | contribs) (correct highlight (via JWB))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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

ZK provides an equivalent JSP tags for each ZUL component. If you'd like to use them in your JSP pages, simply following the following steps.

  1. Specify as the URI of the TLD file in the JSP pages with the taglib directive.
  2. Though optional, it is better to specify DOCTYPE as XHTML 1.0 Transitional, since ZK Client Engine assumes it.
  3. The top of ZK JSP tags must be the page tag (ZK's org.zkoss.zul.jsp.PageTag), which represents a ZK page.

The following is a simple example.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<%@ taglib uri="" prefix="z" %>
		<title>Test of ZUL on JSP</title>
		<h1>1. Header outside z:page</h1>
			<h2>2. Header in z:page</h2>
			<z:window id="win" title="Test" border="normal">
				<p>3. Content in z:window</p>
				<z:button label="Overlap" onClick="win.doOverlapped()" />
				4. Content in z:page after z:window
		<p>5. Content after z:page</p>

Each ZUL component is wrapped with a JSP tag and each property is wrapped with an attribute the JSP tag. Furthermore, you are free to mix ZK JSP tags with other tags. Thus, the use of ZK JSP tags is straightforward.

Last Update : 2022/01/19

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