JSP Controls Tag Library (Tag Library Documentation Generator - Generated Documentation)
JSP Controls Tag Library
Standard Syntax:
<%@ taglib prefix="jc" uri="http://jspcontrols.net/tags/core" %>
XML Syntax:
<anyxmlelement xmlns:jc="http://jspcontrols.net/tags/core" />
JSP Controls Tag Tibrary provides the lifecycle for portlet-like JSP components. The Library does not require a portal engine or another central controller. The components built with the Library can be used in any JSP-based application.
The tags must be grouped in the following fashion (code snippet from the Login Component sample, having two input events: "login" and "logout", and two views: "loggedin" and "notloggedin":
<%-- Accept phase --%> <jc:accept> <jc:handler event="login"> ... </jc:handler> <jc:handler event="logout"> ... </jc:handler> <jc:reload/> </jc:accept> <%-- Render phase --%> <jc:prerender> ... </jc:prerender> <jc:render view="notloggedin"> ... </jc:render> <jc:render view="loggedin"> ... </jc:render>
See Component Lifecycle description for more details.
Tag Library Information | |
Display Name | JSP Controls Tag Library |
Version | 0.2 |
Short Name | jc |
URI | http://jspcontrols.net/tags/core |
Tag Summary | |
accept | The body of this tag is evaluated if request contains an event parameter. By default, the key of event parameter is built using event name like "login" and a standard event suffix ".jspcontrols.event", resulting in "login.jspcontrols.event". Value of event parameter is not used, but you are advised to specify it, using any dummy value like "1" or "TRUE", so the complete key/value pair of event parameter would result in something like "login.jspcontrols.event=TRUE". The "eventmask" attribute a Accept tag must precede Prerender and Render tags on JSP page. Only one Accept tag should be specified per component. |
handler | Handles input event. The body of this tag is evaluated if its "event" attribute equals to an event sent with request. This tag handles only standard events with ".jspcontrols.event" suffix in the key name. Handler tags must be defined in the body of Accept tag, otherwise they will not be evaluated. Use a separate Handler tag per event. |
reload | Reloads a composite page either by redirecting (default) or by forwarding (optional) to a page containing the component. It is possible to load a different page by specifing the address of target page either in "target" attribute or in the body of the tag. If the component is properly configured, it will use asynchronous in-place update (Ajax) instead of reloading when possible. See Component Lifecycle description for details. |
prerender | Initializes the view. Stores the page address to be used on reload; set response header to "text/xml" for Ajax request. Prerender tag must be specified after Accept tag and before any of Render tags. |
render | The tag is to be used on render phase. The body of this tag is evaluated if its "view" attribute equals to a scoped variable "jspcontrolsViewSelected" defined either in page or request scope. The body of this tag is always evaluated if "view" attribute is omitted. This is an optional tag that does not have any side effects. You can use JSP scriptlets of JSTL conditional actions to display a particular view of a component. |
Java, JSP, and JavaServer Pages are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries. Copyright 2002-3 Sun Microsystems, Inc. 4150 Network Circle Santa Clara, CA 95054, U.S.A. All Rights Reserved.