UI-Component Sets
Project Documentation

Summary

Tag name: <h:commandScript>
UIComponent class: javax.faces.component.html.HtmlCommandScript
Tag class: org.apache.myfaces.taglib.html.HtmlCommandScriptTag
Component type: javax.faces.HtmlCommandScript
Component family: javax.faces.Command
Renderer type: javax.faces.Script
Renderer class: org.apache.myfaces.renderkit.html.HtmlCommandScriptRenderer

Supported Listeners

Name Listener Event Phases Required Description
$listener.isRequired()

Attributes

Name Type Supports EL? Description
action javax.el.MethodExpression Yes The action to take when this command is invoked.

If the value is an expression, it is expected to be a method binding EL expression that identifies an action method. An action method accepts no parameters and has a String return value, called the action outcome, that identifies the next view displayed. The phase that this event is fired in can be controlled via the immediate attribute.

If the value is a string literal, it is treated as a navigation outcome for the current view. This is functionally equivalent to a reference to an action method that returns the string literal.

actionListener javax.faces.el.MethodBinding Only EL
autorun boolean Yes
binding javax.faces.component.html.HtmlCommandScript Only EL Identifies a backing bean property (of type UIComponent or appropriate subclass) to bind " + "to this component instance. This value must be an EL expression.
execute String Yes
id String Yes Get a string which uniquely identifies this UIComponent within the scope of the nearest ancestor NamingContainer component. The id is not necessarily unique across all components in the current view.
immediate boolean Yes A boolean value that identifies the phase during which action events should fire.

During normal event processing, action methods and action listener methods are fired during the "invoke application" phase of request processing. If this attribute is set to "true", these methods are fired instead at the end of the "apply request values" phase.

name String Yes
onerror String Yes
onevent String Yes
render String Yes
rendered boolean Yes A boolean value that indicates whether this component should be rendered. Default value: true.
resetValues Boolean Yes
value Object Yes The text to display to the user for this command component.