1.3 1.2 Struts-Faces http://struts.apache.org/tags-faces This tag library provides custom action functionality that is similar to that provided by the Struts 1.1 tag libraries, but is built on top of the JavaServer Faces rendering architecture.

This tag library includes the following tags:

]]>
base org.apache.struts.faces.taglib.BaseTag Renders an HTML <base> element with an href attribute pointing to the absolute location of the enclosing JSP page. This tag is valid only when nested inside an HTML <head> element. This tag is useful because it allows you to use relative URL references that are based on the URL of the page itself, rather than the URL to which the most recent submit took place.

]]>
binding false false Value binding expression to bind this component to a backing bean property.

]]>
id false false Component id of this component. rendered false false Boolean attribute indicating whether this component should be rendered or not. target false false Target frame for this base reference.
commandLink org.apache.struts.faces.taglib.CommandLinkTag Renders an HTML <a> element defining a hyperlink that submits the current form. This component is required because the JSF 1.0 and 1.1 specifications require interoperability between the renderers for the form element and the command link element, without providing a portable mechanism to allow intermixed libraries.

]]>
action false false actionListener false false id false false immediate false false rendered false false value false false accesskey false false charset false false dir false false hreflang false false lang false false onblur false false onclick false false ondblclick false false onfocus false false onkeydown false false onkeypress false false onkeyup false false onmousedown false false onmousemove false false onmouseout false false onmouseover false false onmouseup false false rel false false rev false false style false false styleClass false false tabindex false false target false false title false false type false false
errors org.apache.struts.faces.taglib.ErrorsTag Displays a list of error messages prepared by form bean or business logic validation processing.

In order to use this component successfully, you must have defined an application scope MessageResources bean under the specified attribute name, with optinal definitions for the following message keys:

]]>
binding false false Value binding expression to bind this component to a backing bean property.

]]>
bundle false false Name of the servlet context attribute under which the desired MessageResources bundle is stored. If not specified, the default bundle for this sub-application will be used.

]]>
id false false Component id of this component. property false false Component of the component for which to render errors. If not specified, all messages (regardless of property) are displayed. rendered false false Boolean attribute indicating whether this component should be rendered or not.
form org.apache.struts.faces.taglib.FormTag Render an HTML form element containing the nested components to present the appropriate label and input field elements. This tag is distinguished from the tag in the standard HTML RenderKit because it accepts a Struts <action> path as a parameter, and triggers the creation of a Struts form bean if needed.

]]>
action true false Struts Action to which this form should be submitted. This value must exactly match the path attribute of the corresponding <action> element in the struts-config.xml configuration file for this application module.

]]>
binding false false Value binding expression to bind this component to a backing bean property.

]]>
enctype false false The content encoding to be used to submit this form, if the method is POST. This must be set to "multipart/form-data" if your form includes file upload field(s). If not specified, the browser default ("application/x-www-form-urlencoded") is used.

]]>
focus false false The identifier of the form field that should receive focus when this form is rendered.

]]>
focusIndex false false If the focus field is an array, such as a radio button group, you can specify the index of the array element to receive focus.

]]>
id false false Component id of this component. onreset false false JavaScript event handler executed if this form is reset.

]]>
onsubmit false false JavaScript event handler executed if this form is submitted.

]]>
rendered false false Boolean attribute indicating whether this component should be rendered or not. style false false CSS styles to be applied to this HTML element.

]]>
styleClass false false CSS style class to use when rendering this component. target false false Window target to which this form is submitted, such as for use in framed presentations.

]]>
html org.apache.struts.faces.taglib.HtmlTag JSP Renders an HTML <html> element with language attributes extracted from the user's current Locale object, if there is one.

]]>
binding false false Value binding expression to bind this component to a backing bean property.

]]>
id false false Component id of this component. locale false false Set to true in order to record a Locale based on the current request's Accept-Language header (if any), if none has currently been set.

]]>
rendered false false Boolean attribute indicating whether this component should be rendered or not. xhtml false false Set to true to render an xml:lang element on the generated html element. It also causes nested Struts HTML tags (although not JavaServer Faces component tags) to render themselves as xhtml.

]]>
javascript org.apache.struts.faces.taglib.JavascriptValidatorTag IMPLEMENTATION NOTE - Unlike other tags in this tag library, this does not correspond to a JavaServer Faces user interface component. It is based on the tag implementation class used in the struts-html tag library.

Render JavaScript validation based on the validation rules loaded by the ValidatorPlugIn. The set of validation rules that should be generated is based on the formName attribute passed in, which should match the name attribute of the form element in the xml file.

The dynamicJavascript and staticJavascript attributes default to true, but if dynamicJavascript is set to true and staticJavascript is set to false then only the dynamic JavaScript will be rendered. If dynamicJavascript is set to false and staticJavascript is set to true then only the static JavaScript will be rendered which can then be put in separate JSP page so the browser can cache the static JavaScript.

]]>
cdata false true If set to "true" and XHTML has been enabled, the JavaScript will be wrapped in a CDATA section to prevent XML parsing. The default is "true" to comply with the W3C's recommendation.

]]>
dynamicJavascript false false Whether or not to render the dynamic JavaScript. Defaults to true.

]]>
formName false true The key (form name) to retrieve a specific set of validation rules.

]]>
htmlComment false true Whether or not to enclose the javascript with HTML comments. This attribute is ignored in XHTML mode because the script would be deleted by the XML parser. See the cdata attribute for details on hiding scripts from XML parsers. Defaults to true.

]]>
method false true The alternate JavaScript method name to be used instead of the of the default. The default is 'validate' concatenated in front of the key (form name) passed in (ex: validateRegistrationForm).

]]>
page false true The current page of a set of validation rules if the page attribute for the field element in the xml file is in use.

]]>
src false true The src attribute's value when defining the html script element.

]]>
staticJavascript false false Whether or not to render the static JavaScript. Defaults to true.

]]>
loadMessages org.apache.struts.faces.taglib.LoadMessagesTag empty Create a Map wrapping the specified MessageResources instance, which will return localized messages based on the Locale stored in the view root component of the current view.

]]>
messages false false Application scope key containing the MessageResources instance to be exposed. If not specified, the default MessageResources instance for the current application module is exposed.

]]>
var true false Request scope key under which the Map will be stored.

]]>
message org.apache.struts.faces.taglib.MessageTag JSP Render the message text looked up from a message resources bundle, based on our current locale. The message key must be specified by exactly one of the following attributes:

The MessageResources bundle to be used is specified by the bundle attribute, as follows:

Substitution parameters for the message may be nested inside this tag by using the parameter tag from the standard HTML RenderKit tag library.

Additional control over the rendering process is specified by the following optional attributes, with default values as indicated:

]]>
binding false false Value binding expression to bind this component to a backing bean property.

]]>
bundle false false Name of the servlet context attribute under which the desired MessageResources bundle is stored. If not specified, the default bundle for this sub-application will be used.

]]>
filter false false Should we filter the output for characters that are sensitive in HTML? The default value is true.

]]>
id false false Component identifier of the component corresponding to this tag.

]]>
key false false Literal value of the message key to look up. Exactly one of key and value must be specified.

]]>
rendered false false Boolean attribute indicating whether this component should be rendered or not. style false false CSS styles used to render this component.

]]>
styleClass false false Name of the CSS style class used to render this component.

]]>
value false false Value reference expression used to retrieve a dynamic value for the message key to look up. Exactly one of key and value must be specified.

]]>
stylesheet org.apache.struts.faces.taglib.StylesheetTag Renders an HTML <link> element with a relative reference to a text/css stylesheet at the specified context-relative path.

]]>
binding false false Value binding expression to bind this component to a backing bean property.

]]>
id false false Component id of this component. path true false Context-relative path to the resource for this relative link. rendered false false Boolean attribute indicating whether this component should be rendered or not.
write org.apache.struts.faces.taglib.WriteTag empty Render the text associated with the specified model object or text string, optionally performing filtering and formatting tasks described by the optional attributes described below. The text to be rendered is specified in exactly one of the following attributes:

Additional control over the rendering process is specified by the following optional attributes, with default values as indicated:

]]>
binding false false Value binding expression to bind this component to a backing bean property.

]]>
filter false false Should we filter the output for characters that are sensitive in HTML? The default value is true.

]]>
id false false Component identifier of the component corresponding to this tag.

]]>
rendered false false Boolean attribute indicating whether this component should be rendered or not. style false false CSS styles used to render this component.

]]>
styleClass false false Name of the CSS style class used to render this component.

]]>
value false false Literal text to be rendered, or value reference expression to retrieve the text to be rendered.

]]>