Top Description Fields Constructors Methods
javax.faces.event

public Class ValueChangeEvent

extends FacesEvent
Class Inheritance
Imports
javax.faces.component.UIComponent, javax.faces.context.FacesContext

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.

Field Summary

Modifier and TypeField and Description
private Object
newValue

The current local value of the source UIComponent.

private Object
oldValue

The previous local value of the source UIComponent.

private static final long

Constructor Summary

AccessConstructor and Description
public
ValueChangeEvent(UIComponent
Source UIComponent for this event
component
,
Object
The previous local value of this UIComponent
oldValue
,
Object
The new local value of thie UIComponent
newValue
)

Construct a new event object from the specified source component, old value, and new value.

public
ValueChangeEvent(FacesContext
the Faces context.
facesContext
,
UIComponent
Source UIComponent for this event
component
,
Object
The previous local value of this UIComponent
oldValue
,
Object
The new local value of thie UIComponent
newValue
)

Construct a new event object from the Faces context, specified source component, old value and new value.

Method Summary

Modifier and TypeMethod and Description
public Object

Returns:

the current local value
getNewValue
()

Return the current local value of the source UIComponent.

public Object

Returns:

the previous local value
getOldValue
()

Return the previous local value of the source UIComponent.

public boolean
isAppropriateListener(FacesListener
FacesListener to evaluate
listener
)

Implements abstract javax.faces.event.FacesEvent.isAppropriateListener.

Return true if this FacesListener is an instance of a listener class that this event supports.

public void
processListener(FacesListener
FacesListener to send this FacesEvent to
listener
)

Implements abstract javax.faces.event.FacesEvent.processListener.

Broadcast this FacesEvent to the specified FacesListener, by whatever mechanism is appropriate.

Inherited from javax.faces.event.FacesEvent:
getComponentgetFacesContextgetPhaseIdqueuesetPhaseId

Field Detail

newValueback to summary
private Object newValue

The current local value of the source UIComponent.

oldValueback to summary
private Object oldValue

The previous local value of the source UIComponent.

serialVersionUIDback to summary
private static final long serialVersionUID

Hides javax.faces.event.FacesEvent.serialVersionUID.

Constructor Detail

ValueChangeEventback to summary
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.

Parameters
component:UIComponent

Source UIComponent for this event

oldValue:Object

The previous local value of this UIComponent

newValue:Object

The new local value of thie UIComponent

Exceptions
IllegalArgumentException:
if component is null
ValueChangeEventback to summary
public ValueChangeEvent(FacesContext facesContext, UIComponent component, Object oldValue, Object newValue)

Construct a new event object from the Faces context, specified source component, old value and new value.

The default PhaseId for this event is PhaseId#ANY_PHASE.

Parameters
facesContext:FacesContext

the Faces context.

component:UIComponent

Source UIComponent for this event

oldValue:Object

The previous local value of this UIComponent

newValue:Object

The new local value of thie UIComponent

Exceptions
IllegalArgumentException:
if component is null

Method Detail

getNewValueback to summary
public Object getNewValue()

Return the current local value of the source UIComponent.

Returns:Object

the current local value

getOldValueback to summary
public Object getOldValue()

Return the previous local value of the source UIComponent.

Returns:Object

the previous local value

isAppropriateListenerback to summary
public boolean isAppropriateListener(FacesListener listener)

Implements abstract javax.faces.event.FacesEvent.isAppropriateListener.

Doc from javax.faces.event.FacesEvent.isAppropriateListener.

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.

Parameters
listener:FacesListener

FacesListener to evaluate

Returns:boolean

true if it is the appropriate instance, false otherwise.

Annotations
@Override
processListenerback to summary
public void processListener(FacesListener listener)

Implements abstract javax.faces.event.FacesEvent.processListener.

Doc from javax.faces.event.FacesEvent.processListener.

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.

Parameters
listener:FacesListener

FacesListener to send this FacesEvent to

Annotations
@Override
Exceptions
AbortProcessingException:
Signal the JavaServer Faces implementation that no further processing on the current event should be performed