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
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
clear(FacesContext facesContext)
Clear the current view map using the Faces context.void
clear(FacesContext facesContext, String viewMapId, Map<String,Object> viewMap)
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.
-
-
-
Method Detail
-
clear
public void clear(FacesContext facesContext)
Clear the current view map using the Faces context.- Parameters:
facesContext
- the Faces context.
-
clear
@Deprecated public void clear(FacesContext facesContext, Map<String,Object> viewMap)
Deprecated.Clear the given view map. Use the version with the viewMapId.- Parameters:
facesContext
- the Faces context.viewMap
- the given view map.
-
clear
public void clear(FacesContext facesContext, String viewMapId, Map<String,Object> viewMap)
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
public void fireInitializedEvent(FacesContext facesContext, UIViewRoot root)
-
fireDestroyedEvent
public void fireDestroyedEvent(FacesContext facesContext, UIViewRoot root)
-
-