D.6 Package javax.faces.event
An instance of this class is
thrown by an event
handler to terminate further processing of the event.
Synopsis
Class name:
|
javax.faces.event.AbortProcessingException
|
Extends:
|
javax.faces.FacesException
|
Implements:
|
java.io.Serializable
|
Constructors
- public AbortProcessingException()
-
Creates an empty instance.
- public AbortProcessingException(String message)
-
Creates an instance with the specified message.
- public AbortProcessingException(String message, Throwable rootCause)
-
Creates an instance with the specified message and root cause.
- public AbortProcessingException(Throwable rootCause)
-
Creates an instance with the specified root cause.
An instance of this class
signals that the user
activated a component, e.g., a UICommand
component.
Synopsis
Class name:
|
javax.faces.event.ActionEvent
|
Extends:
|
javax.faces.event.FacesEvent
|
Implements:
|
java.io.Serializable
|
Constructors
- public ActionEvent(javax.faces.component.UIComponent component)
-
Creates an instance for the specified source component.
Methods
- public boolean isAppropriateListener(javax.faces.event.FacesListener listener)
-
Returns true if the listener is an
ActionListener.
- public void processListener(javax.faces.event.FacesListener listener)
-
Calls the listener's processAction(
) method.
This interface is implemented
by all classes
interested in handling ActionEvent events.
Synopsis
Interface name:
|
javax.faces.event.ActionListener
|
Extends:
|
javax.faces.event.FacesListener
|
Implemented by:
|
All classes interested in handling ActionEvent
events.
|
Methods
- public void processAction(javax.faces.event.ActionEvent event)
-
Processes the event.
This is the base class for all
classes
representing specific component events.
Synopsis
Class name:
|
javax.faces.event.FacesEvent
|
Extends:
|
java.util.EventObject
|
Implements:
|
java.io.Serializable
|
Constructors
- public FacesEvent(javax.faces.component.UIComponent component)
-
Creates an instance for the specified source component.
Methods
- public javax.faces.component.UIComponent getComponent()
-
Returns the source component for the event.
- public javax.faces.event.PhaseId getPhaseId()
-
Returns the identifier for the request processing lifecycle phase
when the event listeners shall be notified of the event. The default
value is PhaseId.ANY_PHASE.
- public abstract boolean isAppropriateListener(javax.faces.event.FacesListener listener)
-
Returns true if the listener is of an appropriate
type for this event type.
- public abstract void processListener(javax.faces.event.FacesListener listener)
-
Calls the listener's event processing method.
- public void queue()
-
Calls the source component's queueEvent(
) method.
- public void setPhaseId(javax.faces.event.PhaseId phaseId)
-
Sets the identifier for the request processing lifecycle phase when
the event listeners shall be notified of the event. If set to
PhaseId.ANY_PHASE, the listeners are notified in
the same phase as where the event is queued.
This is the base interface for all
interfaces representing
specific component event listeners. It's an empty
interface, used for type-safety only.
Synopsis
Interface name:
|
javax.faces.event.FacesListener
|
Extends:
|
java.util.EventListener
|
Implemented by:
|
Indirectly by all classes implementing a subinterface.
|
An instance of this class
signals that a new
request processing lifecycle phase begins or ends.
Synopsis
Class name:
|
javax.faces.event.PhaseEvent
|
Extends:
|
java.util.EventListener
|
Implements:
|
java.io.Serializable
|
Constructors
- public PhaseEvent(javax.faces.context.FacesContext context, javax.faces.event.PhaseId phaseId, javax.faces.lifecycle.Lifecycle lifecycle)
-
Creates an instance for the specified phase, context and
Lifecycle instance.
Methods
- public javax.faces.context.FacesContext getFacesContext()
-
Returns the FacesContext instance.
- public javax.faces.event.PhaseId getPhaseId()
-
Returns the PhaseId for the phase the event
signals the beginning or the end of.
Instances of this
class represent the
request processing lifecycle phase. All instances are made available
through public final static fields, with ordinal values in the order
ANY_PHASE, RESTORE_VIEW,
APPLY_REQUEST_VALUES,
PROCESS_VALIDATIONS,
UPDATE_MODEL_VALUES,
INVOKE_APPLICATION, and
RENDER_RESPONSE.
Synopsis
Class name:
|
javax.faces.event.PhaseEvent
|
Extends:
|
None
|
Implements:
|
java.lang.Comparable
|
Fields
- public static final javax.faces.event.PhaseId ANY_PHASE
-
The phase identifier for any phase.
- public static final javax.faces.event.PhaseId APPLY_REQUEST_VALUES
-
The phase identifier for the Apply Request Values phase.
- public static final javax.faces.event.PhaseId INVOKE_APPLICATION
-
The phase identifier for the Invoke Application phase.
- public static final javax.faces.event.PhaseId PROCESS_VALIDATIONS
-
The phase identifier for the Process Validations phase.
- public static final javax.faces.event.PhaseId RENDER_RESPONSE
-
The phase identifier for the Render Response phase.
- public static final javax.faces.event.PhaseId UPDATE_MODEL_VALUES
-
The phase identifier for the Update Model Values phase.
- public static final javautil.List VALUES
-
All instances in ascending ordinal order.
Methods
- public int compareTo(Object other)
-
Returns a negative integer, zero, or a positive integer if this
object is less than, equal to, or greater than the specified object.
- public int getOrdinal()
-
Returns the ordinal value for this instance.
- public String toString()
-
Returns a String representation of this instance.
This interface is implemented
by all classes
interested in handling PhaseEvent events.
Synopsis
Interface name:
|
javax.faces.event.PhaseListener
|
Extends:
|
java.util.EventListener
|
Implemented by:
|
All classes interested in handling PhaseEvent
events.
|
Methods
- public void afterPhase(javax.faces.event.PhaseEvent event)
-
Processes the event signaling the completion of a phase.
- public void beforePhase(javax.faces.event.PhaseEvent event)
-
Processes the event signaling the beginning of a phase.
- public javax.faces.event.PhaseId getPhaseId()
-
Returns the identifier for the request processing lifecycle phase
when the event listeners wants to be notified of the event. Returning
PhaseId.ANY_PHASE means that the listener wants to
be notified in all phases.
An instance of this class
signals that the user
changed the value of a component, e.g., a UIInput
component.
Synopsis
Class name:
|
javax.faces.event.ValueChangeEvent
|
Extends:
|
javax.faces.event.FacesEvent
|
Implements:
|
java.io.Serializable
|
Constructors
- public ValueChangeEvent(javax.faces.component.UIComponent component,
- Object oldValue, Object newValue)
-
Creates an instance for the specified source component with the old
and new value.
Methods
- public Object getNewValue()
-
Returns the new value.
- public Object getOldValue()
-
Returns the old value.
- public boolean isAppropriateListener(javax.faces.event.FacesListener listener)
-
Returns true if the listener is a
ValueChangeListener.
- public void processListener(javax.faces.event.FacesListener listener)
-
Calls the listener's processValueChange(
) method.
This interface is implemented
by all classes
interested in handling ActionEvent events.
Synopsis
Interface name:
|
javax.faces.event.ActionListener
|
Extends:
|
javax.faces.event.FacesListener
|
Implemented by:
|
All classes interested in handling ActionEvent
events.
|
Methods
- public void processAction(javax.faces.event.ActionEvent event)
-
Processes the event.
|