org.jboss.seam.faces.context
Class ViewScopedContext
java.lang.Object
org.jboss.seam.faces.context.ViewScopedContext
- All Implemented Interfaces:
- EventListener, Context, FacesListener, SystemEventListener
public class ViewScopedContext
- extends Object
- implements Context, SystemEventListener
This class provides the contexts lifecycle for the new JSF-2 @ViewScoped Context
- Author:
- Mark Struberg, Lincoln Baxter, III
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ViewScopedContext
public ViewScopedContext()
get
public <T> T get(Contextual<T> component)
- Specified by:
get in interface Context
get
public <T> T get(Contextual<T> component,
CreationalContext<T> creationalContext)
- Specified by:
get in interface Context
getScope
public Class<? extends Annotation> getScope()
- Specified by:
getScope in interface Context
isActive
public boolean isActive()
- Specified by:
isActive in interface Context
isListenerForSource
public boolean isListenerForSource(Object source)
- Specified by:
isListenerForSource in interface SystemEventListener
processEvent
public void processEvent(SystemEvent event)
- We get PreDestroyViewMapEvent events from the JSF servlet and destroy our contextual instances. This should
(theoretically!) also get fired if the webapp closes, so there should be no need to manually track all view scopes and
destroy them at a shutdown.
- Specified by:
processEvent in interface SystemEventListener
- See Also:
SystemEventListener.processEvent(javax.faces.event.SystemEvent)
getViewRoot
protected UIViewRoot getViewRoot()
getViewMap
protected Map<String,Object> getViewMap()
Copyright © 2009-2011 Seam Framework. All Rights Reserved.