Class PreRenderViewEvent
- java.lang.Object
-
- java.util.EventObject
-
- jakarta.faces.event.SystemEvent
-
- jakarta.faces.event.ComponentSystemEvent
-
- jakarta.faces.event.PreRenderViewEvent
-
- All Implemented Interfaces:
Serializable
public class PreRenderViewEvent extends ComponentSystemEvent
When an instance of this event is passed to
SystemEventListener.processEvent(jakarta.faces.event.SystemEvent)
orComponentSystemEventListener.processEvent(jakarta.faces.event.ComponentSystemEvent)
, the listener implementation may assume that thesource
of this event instance is theUIViewRoot
instance that is about to be rendered.It is valid for a listener for this event to change the
UIViewRoot
in the currentFacesContext
, but the listener must ensure that the newUIViewRoot
was created with a call toViewHandler.createView(jakarta.faces.context.FacesContext, java.lang.String)
, and that the view is fully populated with the children to be traversed during render. The listener implementation may callViewDeclarationLanguage.buildView(jakarta.faces.context.FacesContext, jakarta.faces.component.UIViewRoot)
to populate theUIViewRoot
.- Since:
- 2.0
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class java.util.EventObject
source
-
-
Constructor Summary
Constructors Constructor Description PreRenderViewEvent(UIViewRoot root)
Instantiate a newPreRenderViewEvent
that indicates the argumentroot
is about to be rendered.PreRenderViewEvent(FacesContext facesContext, UIViewRoot root)
Instantiate a newPreRenderViewEvent
that indicates the argumentroot
is about to be rendered.
-
Method Summary
-
Methods inherited from class jakarta.faces.event.ComponentSystemEvent
getComponent, isAppropriateListener, processListener
-
Methods inherited from class jakarta.faces.event.SystemEvent
getFacesContext
-
Methods inherited from class java.util.EventObject
getSource, toString
-
-
-
-
Constructor Detail
-
PreRenderViewEvent
public PreRenderViewEvent(UIViewRoot root)
Instantiate a new
PreRenderViewEvent
that indicates the argumentroot
is about to be rendered.- Parameters:
root
- theUIViewRoot
that is about to be rendered.- Throws:
IllegalArgumentException
- if the argument isnull
.
-
PreRenderViewEvent
public PreRenderViewEvent(FacesContext facesContext, UIViewRoot root)
Instantiate a new
PreRenderViewEvent
that indicates the argumentroot
is about to be rendered.- Parameters:
facesContext
- the Faces context.root
- theUIViewRoot
that is about to be rendered.- Throws:
IllegalArgumentException
- if the argument isnull
.
-
-