Package com.sun.faces.application.view
Class ViewScopeContextManager
java.lang.Object
com.sun.faces.application.view.ViewScopeContextManager
The manager that deals with CDI ViewScoped beans.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clear
(FacesContext facesContext) Clear the current view map using the Faces context.void
Clear the given view map.void
clear
(FacesContext facesContext, Map<String, Object> viewMap) Deprecated.<T> T
createBean
(FacesContext facesContext, jakarta.enterprise.context.spi.Contextual<T> contextual, jakarta.enterprise.context.spi.CreationalContext<T> creational) Create the bean.void
fireDestroyedEvent
(FacesContext facesContext, UIViewRoot root) void
fireInitializedEvent
(FacesContext facesContext, UIViewRoot root) <T> T
getBean
(FacesContext facesContext, jakarta.enterprise.context.spi.Contextual<T> contextual) Get the value from the view map (or null if not found).void
sessionDestroyed
(jakarta.servlet.http.HttpSessionEvent httpSessionEvent) Called when a session destroyed.
-
Constructor Details
-
ViewScopeContextManager
public ViewScopeContextManager()
-
-
Method Details
-
clear
Clear the current view map using the Faces context.- Parameters:
facesContext
- the Faces context.
-
clear
Deprecated.Clear the given view map. Use the version with the viewMapId.- Parameters:
facesContext
- the Faces context.viewMap
- the given view map.
-
clear
Clear the given view map.- Parameters:
facesContext
- the Faces context.viewMapId
- The ID of the view mapviewMap
- the given view map.
-
createBean
public <T> T createBean(FacesContext facesContext, jakarta.enterprise.context.spi.Contextual<T> contextual, jakarta.enterprise.context.spi.CreationalContext<T> creational) Create the bean.- Type Parameters:
T
- the type.- Parameters:
facesContext
- the faces context.contextual
- the contextual.creational
- the creational.- Returns:
- the value or null if not found.
-
getBean
public <T> T getBean(FacesContext facesContext, jakarta.enterprise.context.spi.Contextual<T> contextual) Get the value from the view map (or null if not found).- Type Parameters:
T
- the type.- Parameters:
facesContext
- the faces context.contextual
- the contextual.- Returns:
- the value or null if not found.
-
sessionDestroyed
public void sessionDestroyed(jakarta.servlet.http.HttpSessionEvent httpSessionEvent) Called when a session destroyed.- Parameters:
httpSessionEvent
- the HTTP session event.
-
fireInitializedEvent
-
fireDestroyedEvent
-