Tag Library DocumentationChrysalis uses several custom tag libraries to support JSP development. These libraries are named after their preferred tag prefix.
The documentation of these libraries is written for page developers who know little or no Java. These page developers should have a basic understanding of objects (Java Beans) and their properties. Where appropriate, a Technical Note may be added with additional information for Java developers. Common Tag AttributesThe tags in these libraries use some common attributes to manipulate business objects (Java Beans).
varA <jutil:use var="item" controller="Catalog" /> <jutil:print object="item" property="name" /> Each time an object is assigned to a Some care must be taken when naming variables. If the variable name matches the name of another variable elsewhere in the page, the old value for that variable will be overwritten.
Technical Note: All variable values are stored in the JSP
objectAn <jutil:use var="item" controller="Catalog" /> <!-- Print the "name" property of the "item" object: --> <jutil:print property="name" /> <!-- The above is equivalent to: --> <jutil:print object="item" property="name" /> For a few tags, an alternate name for the propertyA For tags that have both <!-- Use the "order" property of the Cart controller: --> <jutil:use var="order" controller="Cart" /> <!-- The above is equivalent to: --> <jutil:use var="order" controller="Cart" property="order" /> Technical Note: The value is retrieved using the appropriate getter method of the object, as per the JavaBean specifications. elIn addition to the options described above, a few Chrysalis tags
support JSTL (JSP Standard Tag Language) expressions. These tag
have an "el" attribute, which provides an alternative to the normal
"object" and "property" attributes. JSTL expressions are
particularly useful for defining complex conditions in
<!-- Without EL --> <jutil:print object="item" property="name" /> <!-- With EL --> <jutil:print el="${item.name}" /> You may wonder why we are duplicating this the expression language logic of JSTL rather than simply using JSTL itself. JSTL only works with JSP 1.2+, and one of the design goals of Chrysalis is to comply with the Servlet 2.2/JSP 1.1 standard. The Chrysalis copy of the JSTL Expression Language has been modified to work on older servlet engines. If you are using a Servlet 2.3/JSP 1.2 container, Chrysalis is
compatible with JSTL, and there is nothing preventing you from
combining JSTL tag logic with Chrysalis tags. There are deliberate
similarities between Chrysalis tags and JSTL to simplify this
integration. The only major issue is that JSTL The documentation for the JSTL and its Expression Language can be found at: http://java.sun.com/products/jsp/jstl/. |