- java.lang.Object
-
- javax.faces.lifecycle.Lifecycle
-
- Direct Known Subclasses:
- LifecycleWrapper
public abstract class Lifecycle extends Object
Lifecycle manages the processing of the entire lifecycle of a particular JavaServer Faces request. It is responsible for executing all of the phases that have been defined by the JavaServer Faces Specification, in the specified order, unless otherwise directed by activities that occurred during the execution of each phase.
An instance of
Lifecycle
is created by calling thegetLifecycle()
method ofLifecycleFactory
, for a specified lifecycle identifier. Because this instance is shared across multiple simultaneous requests, it must be implemented in a thread-safe manner.
-
-
Constructor Summary
Constructors Constructor and Description Lifecycle()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method and Description abstract 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.abstract 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.abstract PhaseListener[]
getPhaseListeners()
Return the set of registeredPhaseListener
s for thisLifecycle
instance.abstract 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.abstract 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
-
addPhaseListener
public abstract void addPhaseListener(PhaseListener listener)
Register a new
PhaseListener
instance that is interested in being notified before and after the processing for standard phases of the request processing lifecycle.- Parameters:
listener
- ThePhaseListener
to be registered- Throws:
NullPointerException
- iflistener
isnull
-
execute
public abstract void execute(FacesContext context) throws FacesException
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.- Parameters:
context
- FacesContext for the request to be processed- Throws:
FacesException
- if thrown during the execution of the request processing lifecycleNullPointerException
- ifcontext
isnull
-
attachWindow
public void attachWindow(FacesContext context)
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)
.- Since:
- 2.2
-
getPhaseListeners
public abstract PhaseListener[] getPhaseListeners()
Return the set of registered
PhaseListener
s for thisLifecycle
instance. If there are no registered listeners, a zero-length array is returned.
-
removePhaseListener
public abstract void removePhaseListener(PhaseListener listener)
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.- Parameters:
listener
- ThePhaseListener
to be deregistered- Throws:
NullPointerException
- iflistener
isnull
-
render
public abstract void render(FacesContext context) throws FacesException
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.- Parameters:
context
- FacesContext for the request being processed- Throws:
FacesException
- if an exception is thrown during the execution of the request processing lifecycleNullPointerException
- ifcontext
isnull
-
-
Deutsche Übersetzung
Sie haben gebeten, diese Seite auf Deutsch zu besuchen. Momentan ist nur die Oberfläche übersetzt, aber noch nicht der gesamte Inhalt.Wenn Sie mir bei Übersetzungen helfen wollen, ist Ihr Beitrag willkommen. Alles, was Sie tun müssen, ist, sich auf der Website zu registrieren und mir eine Nachricht zu schicken, in der Sie gebeten werden, Sie der Gruppe der Übersetzer hinzuzufügen, die Ihnen die Möglichkeit gibt, die gewünschten Seiten zu übersetzen. Ein Link am Ende jeder übersetzten Seite zeigt an, dass Sie der Übersetzer sind und einen Link zu Ihrem Profil haben.
Vielen Dank im Voraus.
Dokument erstellt 11/06/2005, zuletzt geändert 18/08/2025
Quelle des gedruckten Dokuments:https://www.gaudry.be/de/java-api-javaee-rf-javax/faces/lifecycle/Lifecycle.html
Die Infobro ist eine persönliche Seite, deren Inhalt in meiner alleinigen Verantwortung liegt. Der Text ist unter der CreativeCommons-Lizenz (BY-NC-SA) verfügbar. Weitere Informationen auf die Nutzungsbedingungen und dem Autor.
Referenzen
Diese Verweise und Links verweisen auf Dokumente, die während des Schreibens dieser Seite konsultiert wurden, oder die zusätzliche Informationen liefern können, aber die Autoren dieser Quellen können nicht für den Inhalt dieser Seite verantwortlich gemacht werden.
Der Autor dieser Website ist allein dafür verantwortlich, wie die verschiedenen Konzepte und Freiheiten, die mit den Nachschlagewerken gemacht werden, hier dargestellt werden. Denken Sie daran, dass Sie mehrere Quellinformationen austauschen müssen, um das Risiko von Fehlern zu reduzieren.