Sunday, June 23, 2013

ZK Custom Taglib


Simple Note

Introduction

This article describe how to define custom taglib in ZK.

Description

You can define taglib in two ways:

1. Put tld file under WebContent, and specify it in zul file with "/PATH/TO/YOUR/TLDFile" directly.

Note the path here starts from WebContent so you can specify it like "/WEB-INF/..."

2. Put tld file under classpath, and specify it in classpath/metainfo/tld/config.xml with a specific URI, and specify the specific URI in zul file.

Note the path specified in config.xml starts from classpath, the tld file should under the classpath of your web project or in a jar file.


Reference

ZK Custom Taglib
http://books.zkoss.org/wiki/ZUML_Reference/ZUML/Processing_Instructions/taglib/Custom_Taglib

Download

Full project at github
https://github.com/benbai123/ZK_Practice/tree/master/General/TaglibTest

No comments:

Post a Comment