Skip to main content.

JSP Controls Tag Library

Navigation: JSP Controls | About

Tag Overview

Standard prefix and URI:
<%@ taglib prefix="jc" uri="http://jspcontrols.net/tags/core" %>

The tags must be grouped in the following fashion: one or more Handler tags, then one or more Reload tags (it is allowed to use Reload tags inside Handler tags), then one Prerender tag, then one or more Render tags if any. See the skeleton below:

<jc:component id="...">

  <%-- Accept phase --%>

  <jc:handler event="..."> ... </jc:handler>
  <jc:handler event="..."> ... </jc:handler>
  <jc:handler event="..."> ... </jc:handler>
  <jc:reload/>

  <%-- Render phase --%>

  <jc:prerender> ... </jc:prerender>
  <jc:render view="..."> ... </jc:render>
  <jc:render view="..."> ... </jc:render>

</jc:component>

See Component Lifecycle description for more details.

Taglib Version


Tag Library Information
Display NameJSP Controls Tag Library
Version0.6
Short Namejc
URIhttp://jspcontrols.net/tags/core

Tags In Brief


Tag Summary
component Encloses JSP fragment. During runtime is converted into a HTML element. Another task of this tag is to set component ID into page context, so other tags inside this component knew the component name.
handler Handles input event. The body of this tag is evaluated if request contains a parameter equal to its "event" attribute.
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.
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 "jspcSelectedView" 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.