- 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 boolean
isListenerForSource(Object source)
Returnstrue
if given source is an instance ofUIViewRoot
.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 ofViewScopeManager
and invoke itsViewScopeManager.preDestroyView()
method.
-
-
-
Method Detail
-
isListenerForSource
public boolean isListenerForSource(Object source)
Returnstrue
if given source is an instance ofUIViewRoot
.- Specified by:
isListenerForSource
in 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 ofViewScopeManager
and invoke itsViewScopeManager.preDestroyView()
method.- Specified by:
processEvent
in interfaceSystemEventListener
-
-