UICommand is a UIComponent that represents a user interface component which, when activated
by the user, triggers an application specific "command" or "action". Such a component is typically rendered as a push
button, a menu item, or a hyperlink.
When the decode() method of this UICommand, or its corresponding Renderer, detects that
this control has been activated, it will queue an ActionEvent. Later on, the broadcast() method
will ensure that this event is broadcast to all interested listeners.
Listeners will be invoked in the following order:
ActionListeners, in the order in which they were registered.
MethodExpression (which will cover the "actionListener" that was set as a
MethodBinding).
ActionListener, retrieved from the Application - and therefore, any attached "action"
MethodExpression.
By default, the rendererType property must be set to "jakarta.faces.Button". This value can
be changed by calling the setRendererType() method.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static enum | UICommand.PropertyKeys
Properties that are tracked by state saving. |
| Modifier and Type | Field and Description |
|---|---|
| public static final String | COMPONENT_FAMILY
The standard component family for this component. |
| public static final String | COMPONENT_TYPE
The standard component type for this component. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | addActionListener(ActionListener
The listener)ActionListener to be addedImplements jakarta.
Add a new |
| public void | broadcast(FacesEvent
FacesEvent to be broadcastOverrides jakarta.
In addition to to the default |
| public MethodExpression | getActionExpression()
Implements jakarta.
Return the |
| public ActionListener[] | getActionListeners()
Implements jakarta.
Return the set of registered |
| public String | getFamily()
Implements abstract jakarta. Return the identifier of the component family to which this component belongs. |
| public Object | Returns: The object representing the value of this component.
Returns the |
| public boolean | |
| public void | queueEvent(FacesEvent
FacesEvent to be queuedOverrides jakarta.
Intercept |
| public void | removeActionListener(ActionListener
The listener)ActionListener to be removedImplements jakarta.
Remove an existing |
| public void | setActionExpression(MethodExpression
The new method expression actionExpression)Implements jakarta.
Set the |
| public void | setImmediate(boolean
The new immediate execution flag immediate)Implements jakarta.
Set the "immediate execution" flag for this |
| public void |
| COMPONENT_FAMILY | back to summary |
|---|---|
| public static final String COMPONENT_FAMILY The standard component family for this component. | |
| COMPONENT_TYPE | back to summary |
|---|---|
| public static final String COMPONENT_TYPE The standard component type for this component. | |
| UICommand | back to summary |
|---|---|
| public UICommand()
Create a new | |
| addActionListener | back to summary |
|---|---|
| public void addActionListener(ActionListener listener) Implements jakarta. Doc from jakarta.
Add a new
| |
| broadcast | back to summary |
|---|---|
| public void broadcast(FacesEvent event) throws AbortProcessingException Overrides jakarta.
In addition to to the default
| |
| getActionExpression | back to summary |
|---|---|
| public MethodExpression getActionExpression() Implements jakarta. Doc from jakarta.
Return the
| |
| getActionListeners | back to summary |
|---|---|
| public ActionListener[] getActionListeners() Implements jakarta. Doc from jakarta.
Return the set of registered
| |
| getFamily | back to summary |
|---|---|
| public String getFamily() Implements abstract jakarta. Doc from jakarta.
Return the identifier of the component family to which this component belongs. This identifier, in conjunction with
the value of the | |
| getValue | back to summary |
|---|---|
| public Object getValue()
Returns the
| |
| isImmediate | back to summary |
|---|---|
| public boolean isImmediate() Implements jakarta. The immediate flag.
| |
| queueEvent | back to summary |
|---|---|
| public void queueEvent(FacesEvent event) Overrides jakarta.
Intercept
| |
| removeActionListener | back to summary |
|---|---|
| public void removeActionListener(ActionListener listener) Implements jakarta. Doc from jakarta.
Remove an existing
| |
| setActionExpression | back to summary |
|---|---|
| public void setActionExpression(MethodExpression actionExpression) Implements jakarta. Doc from jakarta.
Set the
Any method referenced by such an expression must be public, with a return type of
| |
| setImmediate | back to summary |
|---|---|
| public void setImmediate(boolean immediate) Implements jakarta. Doc from jakarta.
Set the "immediate execution" flag for this
| |
| setValue | back to summary |
|---|---|
| public void setValue(Object value)
Sets the
| |
| Modifier and Type | Field and Description |
|---|---|
| public static final UICommand. | |
| public static final UICommand. | |
| public static final UICommand. | |
| public static final UICommand. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static UICommand. | |
| public static UICommand. |
| actionExpression | back to summary |
|---|---|
| public static final UICommand. | |
| immediate | back to summary |
|---|---|
| public static final UICommand. | |
| methodBindingActionListener | back to summary |
|---|---|
| public static final UICommand. | |
| value | back to summary |
|---|---|
| public static final UICommand. | |
| PropertyKeys | back to summary |
|---|---|
| private PropertyKeys() | |
| valueOf | back to summary |
|---|---|
| public static UICommand. | |
| values | back to summary |
|---|---|
| public static UICommand. | |