public class ViewScopeManager extends Object implements javax.servlet.http.HttpSessionListener, javax.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(javax.faces.context.FacesContext facesContext)
Clear the current view map using the Faces context.
|
void |
clear(javax.faces.context.FacesContext facesContext,
Map<String,Object> viewMap)
Deprecated.
|
void |
clear(javax.faces.context.FacesContext facesContext,
String viewMapId,
Map<String,Object> viewMap)
Clear the given view map.
|
void |
destroyBeans(javax.faces.context.FacesContext facesContext,
Map<String,Object> viewMap)
Destroy the managed beans from the given view map.
|
static ViewScopeManager |
getInstance(javax.faces.context.FacesContext facesContext)
Get our instance.
|
boolean |
isListenerForSource(Object source)
Is a listener for the given source.
|
protected static String |
locateViewMapId(javax.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(javax.faces.event.SystemEvent se)
Process the system event.
|
void |
sessionCreated(javax.servlet.http.HttpSessionEvent se)
Create the associated data in the session (if any).
|
void |
sessionDestroyed(javax.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(javax.faces.context.FacesContext facesContext, Map<String,Object> viewMap)
facesContext
- The faces contextviewMap
- The view to locatepublic void clear(javax.faces.context.FacesContext facesContext)
facesContext
- the Faces context.@Deprecated public void clear(javax.faces.context.FacesContext facesContext, Map<String,Object> viewMap)
facesContext
- the Faces context.viewMap
- the view map.public void clear(javax.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(javax.faces.context.FacesContext facesContext, Map<String,Object> viewMap)
facesContext
- the Faces Context.viewMap
- the view map.public static ViewScopeManager getInstance(javax.faces.context.FacesContext facesContext)
facesContext
- the FacesContext.public boolean isListenerForSource(Object source)
isListenerForSource
in interface javax.faces.event.SystemEventListener
source
- the source.public void processEvent(javax.faces.event.SystemEvent se) throws javax.faces.event.AbortProcessingException
processEvent
in interface javax.faces.event.SystemEventListener
se
- the system event.javax.faces.event.AbortProcessingException
- when processing needs to be aborter.public void sessionCreated(javax.servlet.http.HttpSessionEvent se)
sessionCreated
in interface javax.servlet.http.HttpSessionListener
se
- the HTTP session event.public void sessionDestroyed(javax.servlet.http.HttpSessionEvent hse)
sessionDestroyed
in interface javax.servlet.http.HttpSessionListener
hse
- the HTTP session event.Copyright © 2010–2021 JBoss by Red Hat. All rights reserved.