Tomahawk sandbox tag library.

Standard Syntax:
     <%@ taglib prefix="s" uri="" %>

XML Syntax:
     <anyxmlelement xmlns:s="" />

Enhanced standard JSP actions and custom MyFaces actions.

Tag Library Information
Display NameTomahawk sandbox tag library.
Short Names

Tag Summary
accordionPanelA group of panels, which can be opened and closed. See attribute layout for further description on how opening and closing works. Extends standard panelGroup by user role support.
ajaxChildComboBoxRefreshes contents through an ajax call when the parent combo box's value is changed. This component is to be used in conjunction with a regular combo box or list box. When the selected value of the latter changes, it executes an ajax call to the specified method to refresh its contents based on the new selected value.
autoUpdateDataTableExtended data_table that adds some additional features to the standard data_table action: see attribute descriptions for preserveDataModel, sortColumn, sortAscending and preserveSort. NOTE: This component is deprecated. Use periodicalUpdate mechanism of partial page rendering instead
validationScriptNo Description
conversationputs a bean into the conversation context add a bean under context control
endConversationend a conversation

Ensures a named conversation is running

check if a conversation is active.

The way this is done here is sub-optimal, once we are on jsf 1.2 it should be possible to check this before ANY rendering - and maybe to invoke a navigation then

separateConversationContextSeparates the current context from the children. e.g. commandLinks will start a new conversation context separate the current context from the to be rendered children. E.g. when you render commandLinks they will start a new conversationContext
startConversationstart a conversation
modalDialogEmbeds into the current page a javascript object with methods which can be called to display (and hide) a modal popup window.

When the popup window is displayed, the current window contents become "greyed out" and the new window appears on top of the original. The original window does not respond to keys or clicks; only the new window can be accessed by the user. When the popup window is closed then the original window is again accessable.

When this component has a child facet named "titleBar" then the contents of that facet are rendered at the top of the popup window. This facet is intended to allow users to define their own custom window "decoration".

When this component has no "titleBar" facet, but does have a "dialogTitle" property, then a default window decoration is generated. It consists of a table row with two cells. The left cell contains the dialogTitle text. If property renderCloseButton is true, then the right cell holds a "close" icon. Styles are defined for the row and cells so that the look-and-feel can be customised.

The new window can optionally load a page from the server when it is displayed. If one of viewId or contentURL is defined, then an internal frame is inserted after the titleBar, and the specified contents is immediately loaded into the popup window when it is displayed.

The rest of the child components (ie other than titleBar) are displayed after the titlebar (and after the contents of viewId or contentURL if it is defined).

This component internally uses the Dojo modal window widget.

layoutingContentPaneBase content pane for the dojo layouts jsfed dojo content pane
layoutingSplitPanePanelGroup which supports a partialTriggers Attribute similar to the one in Trinidad
floatingPanePanelGroup which supports a partialTriggers Attribute similar to the one in Trinidad
layoutingTitlePaneTitle Pane layouting element. TitlePane Component class
effectprovides javascript effects which are from the library and from the fat fade anything technique library
fishEyeCommandLinkCommandLink component that can be used in nodeStamp facet
fishEyeNavigationMenuProvide a FishEye toolbar component from the DOJO toolkit

A navigation menu/toolbar with a nice mouse-over effect, similar to the Mac OS X Dock. It is actually a JSF implementation of the Fisheye List widget from the Dojo Toolkit.

The component makes use of the Tomahawk navigation framework, so the menu items can be added using t:navigationMenuItem child components.

focusNo Description
formRenders a HTML form element which allow defining a different scheme, servername or port for the action url to which the form is submited
globalIdA simple container-component that causes its child components to render a clientId value without any prefix.

Important: this component works only when run in a JSF-1.2 (or later) environment. When run in a JSF-1.1 environment it will not cause an error, but will instead act like a NamingContainer itself, ie will add its own id to the child component's clientId.

Every JSF component has a "clientId" property; when the component is rendered, many components output this as part of the rendered representation. In particular, when rendering HTML, many components write an "id" attribute on their html element which contains the clientId. The clientId is defined as being the clientId value of the nearest NamingContainer ancestor plus ":" plus the component's id.

The prefixing of the parent container's clientId is important for safely building views from multiple files (eg using Facelets templating or JSP includes). However in some cases it is necessary or useful to render a clientId which is just the raw id of the component without any naming-container prefix; this component can be used to do that simply by adding an instance of this type as an ancestor of the problem components. This works for all JSF components, not just Tomahawk ones.

Use of this component should be a "last resort"; having clientIds which contain the id of the ancestor NamingContainer is important and useful behaviour. It allows a view to be built from multiple different files (using facelets templating or jsp includes); without this feature, component ids would need to be very carefully managed to ensure the same id was not used in two places. In addition, it would not be possible to include the same page fragment twice.

Ids are sometimes used by Cascading Style Sheets to address individual components, and JSF compound ids are not usable by CSS. However wherever possible use a style class to select the component rather than using this component to assign a "global" id.

Ids are sometimes used by javascript "onclick" handlers to locate HTML elements associated with the clicked item (document.getById). Here, the onclick handler method can be passed the id of the clicked object, and some simple string manipulation can then compute the correct clientId for the target component, rather than using this component to assign a "global" id to the component to be accessed.

This component is similar to the "forceId" attribute available on many Tomahawk components. Unlike the forceId attribute this (a) can be used with all components, not just Tomahawk ones, and (b) applies to all its child components.

Note that since JSF1.2 forms have the property prefixId which can be set to false to make a UIForm act as if it is not a NamingContainer. This is a good idea; the form component should probably never have been a NamingContainer, and disabling this has no significant negative effects.

graphicImageDynamicExtends standard graphicImage.

This tag renders a html img tag and can be used to render dynamic images.

Embedding images into html pages requires a second request to get the binary data stream of the image. The result is that the state of the view including the state of request scoped beans will not be available when the image is requested.

The image data is written by an image renderer which can be defined by the imageRendererClass attribute.

This component is able to use nested f:param elements to pass parameters to the image renderer.

ifMessageProvide a component that will optionally render its children if the specified component(s) specified has a message. Renders children if any of the component(s) specified in "for" has a message in the context.
imageLoopHTML image loop component. Image loop/slide show component. Provides Javascript methods to control image loop behaviour. Methods: getImageLoop(id) - get image loop object with id, play() - play loop, stop() - stop loop, accelerate() - accelerate loop until minDelay reached, decelerate() - decelerate loop until maxDelay reached, setImageIndex(index) - show image with index, reset() - reset settings to origin values, getImageCount() - get number of images loaded
imageLoopItemsImage loop items.
imageLoopItemImage loop item.
commandButtonAjaxExtends standard commandButton allowing for dynamic ajax submitting of the form.
inputTextAjaxExtends standard inputText allowing for dynamic ajax submitting.
selectBooleanCheckboxAjaxExtends standard selectBooleanCheckbox by user role support.
selectManyCheckboxAjaxExtends standard selectManyCheckbox allowing for dynamic ajax submitting. Current limitations - Bound value must be a Collection of Strings!
selectOneRadioAjaxExtends standard selectOneRadio allowing for dynamic ajax submitting.
listenerAllows a component to listen for events on another component with AJAX input elements. On is the id of the component you want to listen on. eventType is what happened to the component, for instance "onChange" action is what to do if the event occurs, default is "update". Will be able to call arbitrary javascript functions too. NOTE: eventType and action are NOT implemented yet
messageMyFaces extension to the standard messages tag: see summaryDetailSeparator attribute
loadBundleExtended loadbundle which does its job in all life-cycle phases or even on calling LoadBundle.loadBundle() - not only when rendering happens... A load-bundle alternative which allows to use load-bundle even on AJAX-enabled pages.

A component that allows to load bundles not only on rendering, but whenever the page author needs it. By default, it loads it on every lifecycle phase except restore-state and save-state.*

The core-load-bundle only loads its message-bundle on rendering - this load-bundle does it on every life-cycle, and optionally whenever the method loadBundle is called.

mediaNo Description
outputLinkDynamicExtends standard outputLink but links to a dynamically rendered resource (image, file, ...).
passwordStrengthThe passwordStrength component is needed by the web sites which ask the user to enter a powerful password for the purpose of the registration stuff.

The component enables its user to know the strength of the password while (he/she) types it before even submit the form to the server [please see the screenshots].

The component enables its user to define his custom security policy for his password in an easy manner.

The component also have 2 types of presenting the password strength. Till now the strength can be represented as text or progressbar.

pprPanelGroupAJAX component which supports updating its children via AJAX calls. These updates can occur regularly or based on triggering input components.
pprSubmitPPRSubmitTag can be attached to command components, enabling PPR-request inside UIData components
renderOneTag that allows rendering the first child either by index or the first rendered one.

A component that only renders the first child either by index or the first visible one..

roundedDivComponent that allows for a rounded border effect on DIV tags that is supported in CSS2 compatible browsers and IE6.

Component that generates a DIV tag with rounded corners that may be either 3D or 2D in appearence.

The "roundedDiv" component creates a DIV tag that contains images to produce rounded corners. The rounded effect can be either 3D with lighting effects or 2D with a solid color border.

scopeScope control which does basically the same as savestate but bypasses the serialization and utilizes the session directly
scriptAdds (java)script to the browser
stateChangedNotifierA component that listens to changes in the components Shows a confirmation window if some of the input fields of the form have changed its value
submitOnEventAttach an event handler to an input element or use a global event handler to submit a form by "clicking" on a link or button
inputSuggestProvides an input textbox with "suggest" functionality.
inputSuggestAjaxProvides an input textbox with "suggest" functionality, using an ajax request to the server.

A tag that defines an autosuggest control complete with Ajax binding.
This allows you to do real time autocompletion via asynchronous server requests. Note, this control is experimental and it is currently located in the MyFaces sandbox and can be subject to alteration in the immediate future. So use it with care.

outputTextExtending the outputText component in order to introduce the for attribute.
tableSuggestAjaxProvides an input textbox with "suggest" functionality, using an ajax request to the server. The popUp contains a table where each column value can be set to a specific dom node (through dom node id).
filterTableNo Description
sortableColumnNo Description
timedNotifierDisplays a timed notifier tag
convertDateTimeSimple convert that overrides the spec DateTimeConverter and uses TimeZone.getDefault() as the base timezone, rather than GMT. Convert date time using normal system timezone like it should
convertNumberConverter which uses either the manually set destType or the value binding to determine the correct destination type to convert the number to This tag creates a number formatting converter and associates it with the nearest parent UIComponent. It uses either the manually set destType or the value binding to determine the correct destination type to convert the number to. Unless otherwise specified, all attributes accept static values or EL expressions.
convertStringUtilsConverts the format of a string

Converter which modifies a string by changing the input text into upper case, lower case, capitalized. The input string can be optionally trimmed and truncated at some max length. Ellipses (...) can be added to a truncated string.

Provides runtime modification of a string. Uses Apache Lang StringUtils and WordUtils to peform operations.

convertBooleanConverter that translates between boolean values (true/false) and alternate versions of those boolean values like (yes/no), (1/0), and (way/no way).

To customize the representation of a boolean true and false, use {@link #setTrueValue(String)} and {@link #setFalseValue(String)} respectively. If not configured with these setter methods, it defaults to true and false.

The values are case sensitive.

validateCompareToValidates this component against another component.

Specify the foreign component with the for={foreign-component-id} attribute.

Valid operator attribute values:

  • equals: eq, ==, =,
  • not equals: ne, !=,
  • greater than: gt, >,
  • less than: lt, <,
  • greater than or equals: ge, >=,
  • less than or equals: le, <=

If the comparator attribute is specified, the component values are compared using the specified java.util.Comparator object. If no comparator is specified, the component values must implement Comparable and are compared using compareTo(). If either value or foreign value does not implement Comparable and no Comparator is specified, validation always succeeds.

Put this validator on the bottom-most component to insure that the foreign component's value has been converted and validated first.

However, this validator will attempt to convert and validate the foreign component's value if this has not already occurred. This process may not be identical to the standard JSF conversion and validation process.

The validation error message key is currently hardcoded as

"{0} value <{1}> must be {2} {3} value <{4}>"

  • {0} is the parent component id,
  • {1} is the parent component value,
  • {2} is the operator name,
  • {3} is the foreign component id, and
  • {4} is the foreign component value.

The alternateOperatorName attribute can specify a custom operator name. For example, use "after" instead of "greater than" when comparing dates.

The message attribute can specify an alternate validation error message key. For example, use "{0} must be {2} {3}" to remove values from the message.

Known issues:

  • Operator names should be localized.
  • The default message key should be localized.
  • Perhaps an exception should be thrown if the two values are not Comparable and no Comparator is specified.
validateCSVValidation by validating comma separated values individually.
validateISBNA custom validator for isbn codes, based upons Jakarta Commons.
validateUrlA custom validator for url format, based upons Jakarta Commons.
exporterActionListenerExport datatable contents to an excel file or a pdf file.


Like valueChangeListener, but will send valueChange events after the UPDATE_MODEL phase.
This simply means you CAN update your model values within such an event now.
  • It wont be overwritten by the model update
  • And wont trigger another valueChange if you update a value with an valueChangeListener attached

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.