- java.lang.Object
-
- javax.faces.lifecycle.Lifecycle
-
- javax.faces.lifecycle.LifecycleWrapper
-
- All Implemented Interfaces:
- FacesWrapper<Lifecycle>
public abstract class LifecycleWrapper extends Lifecycle implements FacesWrapper<Lifecycle>
Provides a simple implementation of
Lifecycle
that can be subclassed by developers wishing to provide specialized behavior to an existingLifecycle
instance. The default implementation of all methods is to call through to the wrappedLifecycle
.Usage: extend this class and override getWrapped() to return the instance we are wrapping.
- Since:
- 2.2
-
-
Constructor Summary
Constructors Constructor and Description LifecycleWrapper()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method and Description void
addPhaseListener(PhaseListener listener)
Register a newPhaseListener
instance that is interested in being notified before and after the processing for standard phases of the request processing lifecycle.void
attachWindow(FacesContext context)
Create or restore the
ClientWindow
to be used to display theUIViewRoot
for this run through the lifecycle.void
execute(FacesContext context)
Execute all of the phases of the request processing lifecycle, up to but not including the Render Response phase, as described in the JavaServer Faces Specification, in the specified order.PhaseListener[]
getPhaseListeners()
Return the set of registeredPhaseListener
s for thisLifecycle
instance.abstract Lifecycle
getWrapped()
A class that implements this interface uses this method to return an instance of the class being wrapped.
void
removePhaseListener(PhaseListener listener)
Deregister an existingPhaseListener
instance that is no longer interested in being notified before and after the processing for standard phases of the request processing lifecycle.void
render(FacesContext context)
Execute the Render Response phase of the request processing lifecycle, unless theresponseComplete()
method has been called on theFacesContext
instance associated with the current request.
-
-
-
Method Detail
-
getWrapped
public abstract Lifecycle getWrapped()
Description copied from interface:FacesWrapper
A class that implements this interface uses this method to return an instance of the class being wrapped.
- Specified by:
getWrapped
in interfaceFacesWrapper<Lifecycle>
-
addPhaseListener
public void addPhaseListener(PhaseListener listener)
Description copied from class:Lifecycle
Register a new
PhaseListener
instance that is interested in being notified before and after the processing for standard phases of the request processing lifecycle.- Specified by:
addPhaseListener
in classLifecycle
- Parameters:
listener
- ThePhaseListener
to be registered
-
execute
public void execute(FacesContext context) throws FacesException
Description copied from class:Lifecycle
Execute all of the phases of the request processing lifecycle, up to but not including the Render Response phase, as described in the JavaServer Faces Specification, in the specified order. The processing flow can be affected (by the application, by components, or by event listeners) by calls to the
renderResponse()
orresponseComplete()
methods of theFacesContext
instance associated with the current request.- Specified by:
execute
in classLifecycle
- Parameters:
context
- FacesContext for the request to be processed- Throws:
FacesException
- if thrown during the execution of the request processing lifecycle
-
getPhaseListeners
public PhaseListener[] getPhaseListeners()
Description copied from class:Lifecycle
Return the set of registered
PhaseListener
s for thisLifecycle
instance. If there are no registered listeners, a zero-length array is returned.- Specified by:
getPhaseListeners
in classLifecycle
-
removePhaseListener
public void removePhaseListener(PhaseListener listener)
Description copied from class:Lifecycle
Deregister an existing
PhaseListener
instance that is no longer interested in being notified before and after the processing for standard phases of the request processing lifecycle. If no such listener instance has been registered, no action is taken.- Specified by:
removePhaseListener
in classLifecycle
- Parameters:
listener
- ThePhaseListener
to be deregistered
-
render
public void render(FacesContext context) throws FacesException
Description copied from class:Lifecycle
Execute the Render Response phase of the request processing lifecycle, unless the
responseComplete()
method has been called on theFacesContext
instance associated with the current request.- Specified by:
render
in classLifecycle
- Parameters:
context
- FacesContext for the request being processed- Throws:
FacesException
- if an exception is thrown during the execution of the request processing lifecycle
-
attachWindow
public void attachWindow(FacesContext context)
Description copied from class:Lifecycle
Create or restore the
ClientWindow
to be used to display theUIViewRoot
for this run through the lifecycle. See the class documentation forClientWindow
for an overview of the feature. IfExternalContext.getClientWindow()
returns null, create a new instance ofClientWindow
using theClientWindowFactory
. If the result is non-null, callClientWindow.decode(javax.faces.context.FacesContext)
on it. Store the newClientWindow
by callingExternalContext.setClientWindow(javax.faces.lifecycle.ClientWindow)
.- Overrides:
attachWindow
in classLifecycle
-
-
Traduction non disponible
Les API Java ne sont pas encore traduites en français sur l'infobrol. Seule la version anglaise est disponible pour l'instant.
Version en cache
21/08/2025 17:03:25 Cette version de la page est en cache (à la date du 21/08/2025 17:03:25) afin d'accélérer le traitement.Vous pouvez activer le mode utilisateur dans le menu en haut pour afficher la version plus récente de la page.
Document créé le 11/06/2005, dernière modification le 18/08/2025
Source du document imprimé : https://www.gaudry.be/java-api-javaee-rf-javax/faces/lifecycle/LifecycleWrapper.html
L'infobrol est un site personnel dont le contenu n'engage que moi. Le texte est mis à disposition sous licence CreativeCommons(BY-NC-SA). Plus d'info sur les conditions d'utilisation et sur l'auteur.
Références
Ces références et liens indiquent des documents consultés lors de la rédaction de cette page, ou qui peuvent apporter un complément d'information, mais les auteurs de ces sources ne peuvent être tenus responsables du contenu de cette page.
L'auteur de ce site est seul responsable de la manière dont sont présentés ici les différents concepts, et des libertés qui sont prises avec les ouvrages de référence. N'oubliez pas que vous devez croiser les informations de sources multiples afin de diminuer les risques d'erreurs.