public class UICommand extends UIComponentBase implements ActionSource
| Modifier and Type | Field and Description |
|---|---|
static String |
COMPONENT_FAMILY |
static String |
COMPONENT_TYPE |
| Constructor and Description |
|---|
UICommand() |
| Modifier and Type | Method and Description |
|---|---|
void |
addActionListener(ActionListener listener) |
void |
broadcast(FacesEvent event)
Invoke any listeners attached to this object which are listening
for an event whose type matches the specified event's runtime
type.
|
MethodBinding |
getAction() |
MethodBinding |
getActionListener() |
ActionListener[] |
getActionListeners() |
String |
getFamily() |
Object |
getValue() |
boolean |
isImmediate() |
void |
queueEvent(FacesEvent event) |
void |
removeActionListener(ActionListener listener) |
void |
restoreState(FacesContext context,
Object state)
Invoked in the "restore view" phase, this initialises this
object's members from the values saved previously into the
provided state object.
|
Object |
saveState(FacesContext context)
Invoked after the render phase has completed, this method
returns an object which can be passed to the restoreState
of some other instance of UIComponentBase to reset that
object's state to the same values as this object currently
has.
|
void |
setAction(MethodBinding action) |
void |
setActionListener(MethodBinding actionListener) |
void |
setImmediate(boolean immediate) |
void |
setValue(Object value) |
addFacesListener, decode, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientId, getFacesContext, getFacesListeners, getFacet, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, isRendered, isTransient, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient, setValueBindingpublic static final String COMPONENT_TYPE
public static final String COMPONENT_FAMILY
public void setAction(MethodBinding action)
setAction in interface ActionSourcepublic MethodBinding getAction()
getAction in interface ActionSourcepublic void setActionListener(MethodBinding actionListener)
setActionListener in interface ActionSourcepublic MethodBinding getActionListener()
getActionListener in interface ActionSourcepublic void addActionListener(ActionListener listener)
addActionListener in interface ActionSourcepublic ActionListener[] getActionListeners()
getActionListeners in interface ActionSourcepublic void removeActionListener(ActionListener listener)
removeActionListener in interface ActionSourcepublic void broadcast(FacesEvent event) throws AbortProcessingException
UIComponentBaseThis method does not propagate the event up to parent components, ie listeners attached to parent components don't automatically get called.
If any of the listeners throws AbortProcessingException then that exception will prevent any further listener callbacks from occurring, and the exception propagates out of this method without alteration.
ActionEvent events are typically queued by the renderer associated with this component in its decode method; ValueChangeEvent events by the component's validate method. In either case the event's source property references a component. At some later time the UIViewRoot component iterates over its queued events and invokes the broadcast method on each event's source object.
broadcast in class UIComponentBaseevent - must not be null.AbortProcessingExceptionpublic void queueEvent(FacesEvent event)
queueEvent in class UIComponentBasepublic String getFamily()
getFamily in class UIComponentpublic void setImmediate(boolean immediate)
setImmediate in interface ActionSourcepublic boolean isImmediate()
isImmediate in interface ActionSourcepublic void setValue(Object value)
public Object getValue()
public Object saveState(FacesContext context)
UIComponentBasesaveState in interface StateHoldersaveState in class UIComponentBasepublic void restoreState(FacesContext context, Object state)
UIComponentBaserestoreState in interface StateHolderrestoreState in class UIComponentBasestate - is an object previously returned by
the saveState method of this class.Copyright © 2012 Apache Software Foundation. All Rights Reserved.