taglib"

From Documentation
m
Line 24: Line 24:
  
 
The syntax of a taglib document is described in the subsection:
 
The syntax of a taglib document is described in the subsection:
{{ZKDevelopersReferenceHeadingToc}}
+
{{ZUMLReferenceHeadingToc}}
  
 
== uri ==
 
== uri ==

Revision as of 09:58, 15 November 2010


 <?tablib uri="myURI" prefix="my"?>

This directive is used to load a taglib file, which defines a set of static methods that can be used in EL expressions (so called EL functions).

For example, we could load functions defined in the built-in TLD files identified as http://www.zkoss.org/dsp/web/core, and then use the l function.

 <?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
 <window title="${c:l('my.title')}">
 ...
 </window>

If you want to load a TLD file from your Web application, you can specify the path directly. For example, suppose you have a custom TLD at /WEB-INF/tld/my.tld, then you could specify it as follows.

 <?taglib uri="/WEB-INF/tld/my.tld" prefix="my"?>

The syntax of a taglib document is described in the subsection:

Subsections:


uri

[Required][EL is ''not'' allowed]

A URL of the taglib file. Unlike other URL and URI, it doesn't interpret ~ or * specially. And, the page and the taglib files it references must be in the same Web application.

prefix

[Required]

A prefix used to identify functions defined in this taglib file. The prefix could be any non-empty string.

Version History

Version Date Content
     



Last Update : 2010/11/15

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