java.lang.Object
com.sun.faces.lifecycle.Phase
- Direct Known Subclasses:
ApplyRequestValuesPhase,InvokeApplicationPhase,ProcessValidationsPhase,RenderResponsePhase,RestoreViewPhase,UpdateModelValuesPhase
A Phase is a single step in the processing of a Jakarta Faces request throughout its entire
Lifecycle. Each Phase performs the required transitions on the state
information in the FacesContext associated with this request.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddoPhase(FacesContext context, Lifecycle lifecycle, ListIterator<PhaseListener> listeners) Performs PhaseListener processing and invokes the execute method of the Phase.abstract voidexecute(FacesContext context) Perform all state transitions required by the current phase of the request processingLifecyclefor a particular request.abstract PhaseIdgetId()protected voidhandleAfterPhase(FacesContext context, ListIterator<PhaseListener> listenersIterator, PhaseEvent event) HandleafterPhasePhaseListenerevents.protected voidhandleBeforePhase(FacesContext context, ListIterator<PhaseListener> listenersIterator, PhaseEvent event) HandlebeforePhasePhaseListenerevents.protected voidqueueException(FacesContext ctx, Throwable t) protected voidqueueException(FacesContext ctx, Throwable t, String booleanKey)
-
Constructor Details
-
Phase
public Phase()
-
-
Method Details
-
doPhase
public void doPhase(FacesContext context, Lifecycle lifecycle, ListIterator<PhaseListener> listeners) Performs PhaseListener processing and invokes the execute method of the Phase.- Parameters:
context- the FacesContext for the current requestlifecycle- the lifecycle for this request
-
execute
Perform all state transitions required by the current phase of the request processing
Lifecyclefor a particular request.- Parameters:
context- FacesContext for the current request being processed- Throws:
FacesException- if a processing error occurred while executing this phase
-
getId
-
queueException
-
queueException
-
handleAfterPhase
protected void handleAfterPhase(FacesContext context, ListIterator<PhaseListener> listenersIterator, PhaseEvent event) HandleafterPhasePhaseListenerevents.- Parameters:
context- the FacesContext for the current requestlistenersIterator- a ListIterator for the PhaseListeners that need to be invokedevent- the event to pass to each of the invoked listeners
-
handleBeforePhase
protected void handleBeforePhase(FacesContext context, ListIterator<PhaseListener> listenersIterator, PhaseEvent event) HandlebeforePhasePhaseListenerevents.- Parameters:
context- the FacesContext for the current requestlistenersIterator- a ListIterator for the PhaseListeners that need to be invokedevent- the event to pass to each of the invoked listeners
-