- java.lang.Object
-
- org.omnifaces.cdi.viewscope.ViewScopeEventListener
-
- All Implemented Interfaces:
FacesListener,SystemEventListener,ViewMapListener,EventListener
public class ViewScopeEventListener extends Object implements ViewMapListener
Listener for Faces view scope destroy events so that view scope manager can be notified.- Since:
- 1.6
- Author:
- Bauke Scholtz
- See Also:
ViewScopeManager
-
-
Constructor Summary
Constructors Constructor Description ViewScopeEventListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisListenerForSource(Object source)Returnstrueif given source is an instance ofUIViewRoot.voidprocessEvent(SystemEvent event)If the event is an instance ofPreDestroyViewMapEvent, which means that the Faces view scope is about to be destroyed, then find the current instance ofViewScopeManagerand invoke itsViewScopeManager.preDestroyView()method.
-
-
-
Method Detail
-
isListenerForSource
public boolean isListenerForSource(Object source)
Returnstrueif given source is an instance ofUIViewRoot.- Specified by:
isListenerForSourcein interfaceSystemEventListener
-
processEvent
public void processEvent(SystemEvent event)
If the event is an instance ofPreDestroyViewMapEvent, which means that the Faces view scope is about to be destroyed, then find the current instance ofViewScopeManagerand invoke itsViewScopeManager.preDestroyView()method.- Specified by:
processEventin interfaceSystemEventListener
-
-