public class ViewScopeManager extends Object implements jakarta.servlet.http.HttpSessionListener, jakarta.faces.event.ViewMapListener
| Modifier and Type | Field and Description |
|---|---|
static String |
ACTIVE_VIEW_MAPS
Stores the constants to keep track of the active view maps.
|
static String |
ACTIVE_VIEW_MAPS_SIZE
Stores the constant for the maximum active view map size.
|
static String |
VIEW_MAP
Stores the view map.
|
static String |
VIEW_MAP_ID
Stores the view map id.
|
static String |
VIEW_SCOPE_MANAGER
Stores the constant to keep track of the ViewScopeManager.
|
| Constructor and Description |
|---|
ViewScopeManager()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear(jakarta.faces.context.FacesContext facesContext)
Clear the current view map using the Faces context.
|
void |
clear(jakarta.faces.context.FacesContext facesContext,
Map<String,Object> viewMap)
Deprecated.
|
void |
clear(jakarta.faces.context.FacesContext facesContext,
String viewMapId,
Map<String,Object> viewMap)
Clear the given view map.
|
void |
destroyBeans(jakarta.faces.context.FacesContext facesContext,
Map<String,Object> viewMap)
Destroy the managed beans from the given view map.
|
static ViewScopeManager |
getInstance(jakarta.faces.context.FacesContext facesContext)
Get our instance.
|
boolean |
isListenerForSource(Object source)
Is a listener for the given source.
|
protected static String |
locateViewMapId(jakarta.faces.context.FacesContext facesContext,
Map<String,Object> viewMap)
Static method that locates the ID for a view map in the active view maps
stored in the session.
|
void |
processEvent(jakarta.faces.event.SystemEvent se)
Process the system event.
|
void |
sessionCreated(jakarta.servlet.http.HttpSessionEvent se)
Create the associated data in the session (if any).
|
void |
sessionDestroyed(jakarta.servlet.http.HttpSessionEvent hse)
Destroy the associated data in the session.
|
public static final String ACTIVE_VIEW_MAPS
public static final String ACTIVE_VIEW_MAPS_SIZE
public static final String VIEW_MAP
public static final String VIEW_MAP_ID
public static final String VIEW_SCOPE_MANAGER
protected static String locateViewMapId(jakarta.faces.context.FacesContext facesContext, Map<String,Object> viewMap)
facesContext - The faces contextviewMap - The view to locatepublic void clear(jakarta.faces.context.FacesContext facesContext)
facesContext - the Faces context.@Deprecated public void clear(jakarta.faces.context.FacesContext facesContext, Map<String,Object> viewMap)
facesContext - the Faces context.viewMap - the view map.public void clear(jakarta.faces.context.FacesContext facesContext,
String viewMapId,
Map<String,Object> viewMap)
facesContext - the Faces context.viewMapId - The ID of the view mapviewMap - the view map.public void destroyBeans(jakarta.faces.context.FacesContext facesContext,
Map<String,Object> viewMap)
facesContext - the Faces Context.viewMap - the view map.public static ViewScopeManager getInstance(jakarta.faces.context.FacesContext facesContext)
facesContext - the FacesContext.public boolean isListenerForSource(Object source)
isListenerForSource in interface jakarta.faces.event.SystemEventListenersource - the source.public void processEvent(jakarta.faces.event.SystemEvent se)
throws jakarta.faces.event.AbortProcessingException
processEvent in interface jakarta.faces.event.SystemEventListenerse - the system event.jakarta.faces.event.AbortProcessingException - when processing needs to be aborter.public void sessionCreated(jakarta.servlet.http.HttpSessionEvent se)
sessionCreated in interface jakarta.servlet.http.HttpSessionListenerse - the HTTP session event.public void sessionDestroyed(jakarta.servlet.http.HttpSessionEvent hse)
sessionDestroyed in interface jakarta.servlet.http.HttpSessionListenerhse - the HTTP session event.Copyright © 2010–2022 JBoss by Red Hat. All rights reserved.