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 thesourceof this event instance is theUIViewRootinstance that is about to be rendered.It is valid for a listener for this event to change the
UIViewRootin the currentFacesContext, but the listener must ensure that the newUIViewRootwas 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 newPreRenderViewEventthat indicates the argumentrootis about to be rendered.PreRenderViewEvent(FacesContext facesContext, UIViewRoot root)Instantiate a newPreRenderViewEventthat indicates the argumentrootis 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
PreRenderViewEventthat indicates the argumentrootis about to be rendered.- Parameters:
root- theUIViewRootthat is about to be rendered.- Throws:
IllegalArgumentException- if the argument isnull.
-
PreRenderViewEvent
public PreRenderViewEvent(FacesContext facesContext, UIViewRoot root)
Instantiate a new
PreRenderViewEventthat indicates the argumentrootis about to be rendered.- Parameters:
facesContext- the Faces context.root- theUIViewRootthat is about to be rendered.- Throws:
IllegalArgumentException- if the argument isnull.
-
-