org.omnifaces.application
Class ViewScopeEventListener

java.lang.Object
  extended by org.omnifaces.application.ViewScopeEventListener
All Implemented Interfaces:
java.util.EventListener, javax.faces.event.FacesListener, javax.faces.event.SystemEventListener, javax.faces.event.ViewMapListener

public class ViewScopeEventListener
extends java.lang.Object
implements javax.faces.event.ViewMapListener

Listener for JSF view scope destroy events so that view scope provider implementation can be notified.

Since:
1.6
Author:
Bauke Scholtz
See Also:
ViewScopeProvider

Constructor Summary
ViewScopeEventListener()
           
 
Method Summary
 boolean isListenerForSource(java.lang.Object source)
          Returns true if given source is an instance of UIViewRoot.
 void processEvent(javax.faces.event.SystemEvent event)
          If the event is an instance of PreDestroyViewMapEvent, which means that the JSF view scope is about to be destroyed, then find the current instance of ViewScopeProvider and invoke its ViewScopeProvider.preDestroyView() method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ViewScopeEventListener

public ViewScopeEventListener()
Method Detail

isListenerForSource

public boolean isListenerForSource(java.lang.Object source)
Returns true if given source is an instance of UIViewRoot.

Specified by:
isListenerForSource in interface javax.faces.event.SystemEventListener

processEvent

public void processEvent(javax.faces.event.SystemEvent event)
                  throws javax.faces.event.AbortProcessingException
If the event is an instance of PreDestroyViewMapEvent, which means that the JSF view scope is about to be destroyed, then find the current instance of ViewScopeProvider and invoke its ViewScopeProvider.preDestroyView() method.

Specified by:
processEvent in interface javax.faces.event.SystemEventListener
Throws:
javax.faces.event.AbortProcessingException