com.esri.adf.web.faces.application
Class ADFViewHandler

java.lang.Object
  extended byjavax.faces.application.ViewHandler
      extended bycom.esri.adf.web.faces.application.ADFViewHandler
All Implemented Interfaces:
java.util.EventListener, javax.faces.event.PhaseListener, java.io.Serializable

public class ADFViewHandler
extends javax.faces.application.ViewHandler
implements javax.faces.event.PhaseListener

The ADFViewHandler doubles up as both a ViewHandler as well a PhaseListener. It's primary objective is to activate and passivate all the WebContexts in the current view at the appropriate phases of the JSF request lifecycle.

This class is registered in the faces-config.xml bundled in the ADF jars. Since it is registered as both, a ViewHandler as well a PhaseListener, there will be 2 instances of this class in any ADF application.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.faces.application.ViewHandler
CHARACTER_ENCODING_KEY, DEFAULT_SUFFIX, DEFAULT_SUFFIX_PARAM_NAME
 
Constructor Summary
ADFViewHandler()
           This constructor is called when this class is instantiated as a PhaseListener.
ADFViewHandler(javax.faces.application.ViewHandler base)
           This constructor is called when this class is instantiated as a ViewHandler.
 
Method Summary
 void afterPhase(javax.faces.event.PhaseEvent event)
           
 void beforePhase(javax.faces.event.PhaseEvent event)
           
 java.util.Locale calculateLocale(javax.faces.context.FacesContext fc)
           
 java.lang.String calculateRenderKitId(javax.faces.context.FacesContext fc)
           
 javax.faces.component.UIViewRoot createView(javax.faces.context.FacesContext fc, java.lang.String viewId)
           
 java.lang.String getActionURL(javax.faces.context.FacesContext fc, java.lang.String viewId)
           
 javax.faces.event.PhaseId getPhaseId()
           
 java.lang.String getResourceURL(javax.faces.context.FacesContext fc, java.lang.String viewId)
           
 void renderView(javax.faces.context.FacesContext fc, javax.faces.component.UIViewRoot root)
           
 javax.faces.component.UIViewRoot restoreView(javax.faces.context.FacesContext fc, java.lang.String viewId)
           
 void writeState(javax.faces.context.FacesContext fc)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ADFViewHandler

public ADFViewHandler()

This constructor is called when this class is instantiated as a PhaseListener.


ADFViewHandler

public ADFViewHandler(javax.faces.application.ViewHandler base)

This constructor is called when this class is instantiated as a ViewHandler.

This implementation follows the decorator pattern in that this ADFViewHandler decorates the base ViewHandler.

Parameters:
base - the ViewHandler object that this ADFViewHandler decorates
Method Detail

restoreView

public javax.faces.component.UIViewRoot restoreView(javax.faces.context.FacesContext fc,
                                                    java.lang.String viewId)

renderView

public void renderView(javax.faces.context.FacesContext fc,
                       javax.faces.component.UIViewRoot root)
                throws java.io.IOException,
                       javax.faces.FacesException
Throws:
java.io.IOException
javax.faces.FacesException

afterPhase

public void afterPhase(javax.faces.event.PhaseEvent event)
Specified by:
afterPhase in interface javax.faces.event.PhaseListener

beforePhase

public void beforePhase(javax.faces.event.PhaseEvent event)
Specified by:
beforePhase in interface javax.faces.event.PhaseListener

getPhaseId

public javax.faces.event.PhaseId getPhaseId()
Specified by:
getPhaseId in interface javax.faces.event.PhaseListener

writeState

public void writeState(javax.faces.context.FacesContext fc)
                throws java.io.IOException
Throws:
java.io.IOException

calculateLocale

public java.util.Locale calculateLocale(javax.faces.context.FacesContext fc)

calculateRenderKitId

public java.lang.String calculateRenderKitId(javax.faces.context.FacesContext fc)

createView

public javax.faces.component.UIViewRoot createView(javax.faces.context.FacesContext fc,
                                                   java.lang.String viewId)

getActionURL

public java.lang.String getActionURL(javax.faces.context.FacesContext fc,
                                     java.lang.String viewId)

getResourceURL

public java.lang.String getResourceURL(javax.faces.context.FacesContext fc,
                                       java.lang.String viewId)