public class ValueChangeEvent extends FacesEvent
A ValueChangeEvent
is a notification that the local value of
the source component has been change as a result of user interface
activity. It is not fired unless validation of the new value was
completed successfully.
source
Constructor and Description |
---|
ValueChangeEvent(UIComponent component,
Object oldValue,
Object newValue)
Construct a new event object from the specified source component,
old value, and new value.
|
Modifier and Type | Method and Description |
---|---|
Object |
getNewValue()
Return the current local value of the source
UIComponent . |
Object |
getOldValue()
Return the previous local value of the source
UIComponent . |
boolean |
isAppropriateListener(FacesListener listener)
Return
true if this FacesListener is an instance
of a listener class that this event supports. |
void |
processListener(FacesListener listener)
Broadcast this
FacesEvent to the specified
FacesListener , by whatever mechanism is appropriate. |
getComponent, getPhaseId, queue, setPhaseId
getSource, toString
public ValueChangeEvent(UIComponent component, Object oldValue, Object newValue)
Construct a new event object from the specified source component, old value, and new value.
The default PhaseId
for this event is PhaseId.ANY_PHASE
.
component
- Source UIComponent
for this eventoldValue
- The previous local value of this UIComponent
newValue
- The new local value of thie UIComponent
IllegalArgumentException
- if component
is
null
public Object getOldValue()
Return the previous local value of the source UIComponent
.
public Object getNewValue()
Return the current local value of the source UIComponent
.
public boolean isAppropriateListener(FacesListener listener)
FacesEvent
Return true
if this FacesListener
is an instance
of a listener class that this event supports. Typically, this will be
accomplished by an "instanceof" check on the listener class.
isAppropriateListener
in class FacesEvent
listener
- FacesListener
to evaluatepublic void processListener(FacesListener listener)
FacesEvent
Broadcast this FacesEvent
to the specified
FacesListener
, by whatever mechanism is appropriate. Typically,
this will be accomplished by calling an event processing method, and
passing this FacesEvent
as a paramter.
processListener
in class FacesEvent
listener
- FacesListener
to send this FacesEvent
toAbortProcessingException
- Signal the JavaServer Faces
implementation that no further processing on the current event
should be performedCopyright © 2016 JBoss by Red Hat. All rights reserved.