Package com.sun.faces.application.view
Class ViewScopeContextManager
java.lang.Object
com.sun.faces.application.view.ViewScopeContextManager
public class ViewScopeContextManager extends Object
The manager that deals with CDI ViewScoped beans.
-
Constructor Summary
Constructors Constructor Description ViewScopeContextManager() -
Method Summary
Modifier and Type Method Description voidclear(FacesContext facesContext)Clear the current view map using the Faces context.voidclear(FacesContext facesContext, Map<String,Object> viewMap)Clear the given view map.<T> TcreateBean(FacesContext facesContext, jakarta.enterprise.context.spi.Contextual<T> contextual, jakarta.enterprise.context.spi.CreationalContext<T> creational)Create the bean.voidfireDestroyedEvent(FacesContext facesContext, UIViewRoot root)voidfireInitializedEvent(FacesContext facesContext, UIViewRoot root)<T> TgetBean(FacesContext facesContext, jakarta.enterprise.context.spi.Contextual<T> contextual)Get the value from the view map (or null if not found).voidsessionDestroyed(jakarta.servlet.http.HttpSessionEvent hse)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
Clear the given view map.- Parameters:
facesContext- the Faces context.viewMap- 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 hse)Called when a session destroyed.- Parameters:
hse- the HTTP session event.
-
fireInitializedEvent
-
fireDestroyedEvent
-