org.apache.myfaces.view.facelets.compiler
Class RefreshDynamicComponentListener

java.lang.Object
  extended by org.apache.myfaces.view.facelets.compiler.RefreshDynamicComponentListener
All Implemented Interfaces:
EventListener, StateHolder, ComponentSystemEventListener, FacesListener

public final class RefreshDynamicComponentListener
extends Object
implements ComponentSystemEventListener, StateHolder

This listener must be attached to PostRestoreStateEvent so when the view is restored, the algorithm refresh the component that was created using facelets, restoring the transient markup.

Author:
lu4242

Constructor Summary
RefreshDynamicComponentListener()
           
RefreshDynamicComponentListener(String taglibURI, String tagName, Map<String,Object> attributes, String baseKey)
           
 
Method Summary
 boolean isTransient()
           
 void processEvent(ComponentSystemEvent event)
           
 void restoreState(FacesContext context, Object state)
           
 Object saveState(FacesContext context)
           
 void setTransient(boolean newTransientValue)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RefreshDynamicComponentListener

public RefreshDynamicComponentListener(String taglibURI,
                                       String tagName,
                                       Map<String,Object> attributes,
                                       String baseKey)

RefreshDynamicComponentListener

public RefreshDynamicComponentListener()
Method Detail

processEvent

public void processEvent(ComponentSystemEvent event)
Specified by:
processEvent in interface ComponentSystemEventListener

saveState

public Object saveState(FacesContext context)
Specified by:
saveState in interface StateHolder

restoreState

public void restoreState(FacesContext context,
                         Object state)
Specified by:
restoreState in interface StateHolder

isTransient

public boolean isTransient()
Specified by:
isTransient in interface StateHolder

setTransient

public void setTransient(boolean newTransientValue)
Specified by:
setTransient in interface StateHolder


Copyright © 2013 The Apache Software Foundation. All Rights Reserved.