|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.faces.component.UIComponent
javax.faces.component.UIComponentBase
javax.faces.component.UICommand
public class UICommand
see Javadoc of JSF Specification
Field Summary | |
---|---|
static java.lang.String |
COMPONENT_FAMILY
|
static java.lang.String |
COMPONENT_TYPE
|
Constructor Summary | |
---|---|
UICommand()
|
Method Summary | |
---|---|
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()
|
java.lang.String |
getFamily()
|
java.lang.Object |
getValue()
|
boolean |
isImmediate()
|
void |
queueEvent(FacesEvent event)
|
void |
removeActionListener(ActionListener listener)
|
void |
restoreState(FacesContext context,
java.lang.Object state)
Invoked in the "restore view" phase, this initialises this object's members from the values saved previously into the provided state object. |
java.lang.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(java.lang.Object value)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String COMPONENT_TYPE
public static final java.lang.String COMPONENT_FAMILY
Constructor Detail |
---|
public UICommand()
Method Detail |
---|
public void setAction(MethodBinding action)
setAction
in interface ActionSource
public MethodBinding getAction()
getAction
in interface ActionSource
public void setActionListener(MethodBinding actionListener)
setActionListener
in interface ActionSource
public MethodBinding getActionListener()
getActionListener
in interface ActionSource
public void addActionListener(ActionListener listener)
addActionListener
in interface ActionSource
public ActionListener[] getActionListeners()
getActionListeners
in interface ActionSource
public void removeActionListener(ActionListener listener)
removeActionListener
in interface ActionSource
public void broadcast(FacesEvent event) throws AbortProcessingException
UIComponentBase
This 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 UIComponentBase
event
- must not be null.
AbortProcessingException
public void queueEvent(FacesEvent event)
queueEvent
in class UIComponentBase
public java.lang.String getFamily()
getFamily
in class UIComponent
public void setImmediate(boolean immediate)
setImmediate
in interface ActionSource
public boolean isImmediate()
isImmediate
in interface ActionSource
public void setValue(java.lang.Object value)
public java.lang.Object getValue()
public java.lang.Object saveState(FacesContext context)
UIComponentBase
saveState
in interface StateHolder
saveState
in class UIComponentBase
public void restoreState(FacesContext context, java.lang.Object state)
UIComponentBase
restoreState
in interface StateHolder
restoreState
in class UIComponentBase
state
- is an object previously returned by
the saveState method of this class.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |