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
"javax.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 javax.
Add a new |
| public void | broadcast(FacesEvent
FacesEvent to be broadcastOverrides javax.
In addition to to the default |
| public MethodBinding | getAction()
Implements javax.
Deprecated
This has been replaced by
getActionExpression.
If the implementing class also implements |
| public MethodExpression | getActionExpression()
Implements javax.
Return the |
| public MethodBinding | getActionListener()
Implements javax.
Deprecated
Use
getActionListeners instead.
If |
| public ActionListener[] | getActionListeners()
Implements javax.
Return the set of registered |
| public String | getFamily()
Implements abstract javax. 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 | |
| private void | |
| public void | queueEvent(FacesEvent
FacesEvent to be queuedOverrides javax.
Intercept |
| public void | removeActionListener(ActionListener
The listener)ActionListener to be removedImplements javax.
Remove an existing |
| public void | setAction(MethodBinding
The new MethodBinding expression action)Implements javax.
Deprecated
This has been replaced by
setActionExpression(javax.el.MethodExpression).
If the implementing class also implements |
| public void | setActionExpression(MethodExpression
The new method expression actionExpression)Implements javax.
Set the |
| public void | setActionListener(MethodBinding
The new method binding expression actionListener)Implements javax.
Deprecated
This has been replaced by
addActionListener(javax.faces.event.ActionListener).
Wrap the argument |
| public void | setImmediate(boolean
The new immediate execution flag immediate)Implements javax.
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 javax. Doc from javax.
Add a new
| |
| broadcast | back to summary |
|---|---|
| public void broadcast(FacesEvent event) throws AbortProcessingException Overrides javax.
In addition to to the default
| |
| getAction | back to summary |
|---|---|
| public MethodBinding getAction() Implements javax. Doc from javax. Deprecated This has been replaced by
If the implementing class also implements
If the implementing class does not implement
| |
| getActionExpression | back to summary |
|---|---|
| public MethodExpression getActionExpression() Implements javax. Doc from javax.
Return the
Note that it's possible that the returned
| |
| getActionListener | back to summary |
|---|---|
| public MethodBinding getActionListener() Implements javax. Doc from javax. Deprecated Use
If
The method to be invoked, if this
| |
| getActionListeners | back to summary |
|---|---|
| public ActionListener[] getActionListeners() Implements javax. Doc from javax.
Return the set of registered
| |
| getFamily | back to summary |
|---|---|
| public String getFamily() Implements abstract javax. Doc from javax.
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 javax. The immediate flag.
| |
| notifySpecifiedActionListener | back to summary |
|---|---|
| private void notifySpecifiedActionListener(FacesContext context, FacesEvent event) | |
| queueEvent | back to summary |
|---|---|
| public void queueEvent(FacesEvent event) Overrides javax.
Intercept
| |
| removeActionListener | back to summary |
|---|---|
| public void removeActionListener(ActionListener listener) Implements javax. Doc from javax.
Remove an existing
| |
| setAction | back to summary |
|---|---|
| public void setAction(MethodBinding action) Implements javax. Doc from javax. Deprecated This has been replaced by
If the implementing class also implements
If the implementing class does not implement
Any method referenced by such an expression must be public, with a return type of
| |
| setActionExpression | back to summary |
|---|---|
| public void setActionExpression(MethodExpression actionExpression) Implements javax. Doc from javax.
Set the
Any method referenced by such an expression must be public, with a return type of
| |
| setActionListener | back to summary |
|---|---|
| public void setActionListener(MethodBinding actionListener) Implements javax. Doc from javax. Deprecated This has been replaced by
Wrap the argument
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 javax. Doc from javax.
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. | |