org.apache.myfaces.application.jsp
Class JspStateManagerImpl

java.lang.Object
  extended by javax.faces.application.StateManager
      extended by org.apache.myfaces.application.MyfacesStateManager
          extended by org.apache.myfaces.application.jsp.JspStateManagerImpl

public class JspStateManagerImpl
extends MyfacesStateManager

Default StateManager implementation for use when views are defined via tags in JSP pages.

Version:
$Revision: 472792 $ $Date: 2006-11-09 07:34:47 +0100 (Do, 09 Nov 2006) $
Author:
Thomas Spiegl (latest modification by $Author: grantsmith $), Manfred Geiler

Nested Class Summary
protected static class JspStateManagerImpl.SerializedViewCollection
           
protected static class JspStateManagerImpl.SerializedViewKey
           
 
Nested classes/interfaces inherited from class javax.faces.application.StateManager
javax.faces.application.StateManager.SerializedView
 
Field Summary
 
Fields inherited from class javax.faces.application.StateManager
STATE_SAVING_METHOD_CLIENT, STATE_SAVING_METHOD_PARAM_NAME, STATE_SAVING_METHOD_SERVER
 
Constructor Summary
JspStateManagerImpl()
           
 
Method Summary
protected  javax.faces.application.StateManager.SerializedView deserializeView(java.lang.Object state)
           
protected  java.lang.Object getComponentStateToSave(javax.faces.context.FacesContext facesContext)
           
protected  javax.faces.render.RenderKitFactory getRenderKitFactory()
           
protected  javax.faces.application.StateManager.SerializedView getSerializedViewFromServletSession(javax.faces.context.FacesContext context, java.lang.String viewId, java.lang.String sequenceStr)
           
protected  java.lang.Object getTreeStructureToSave(javax.faces.context.FacesContext facesContext)
          Return an object which contains info about the UIComponent type of each node in the view tree.
protected  boolean isCompressStateInSession(javax.faces.context.FacesContext context)
          Reads the value of the org.apache.myfaces.COMPRESS_STATE_IN_SESSION context parameter.
protected  boolean isSerializeStateInSession(javax.faces.context.FacesContext context)
          Reads the value of the org.apache.myfaces.SERIALIZE_STATE_IN_SESSION context parameter.
protected  void restoreComponentState(javax.faces.context.FacesContext facesContext, javax.faces.component.UIViewRoot uiViewRoot, java.lang.String renderKitId)
          Given a tree of UIComponent objects created the default constructor for each node, retrieve saved state info (from either the client or the server) and walk the tree restoring the members of each node from the saved state information.
protected  javax.faces.component.UIViewRoot restoreTreeStructure(javax.faces.context.FacesContext facesContext, java.lang.String viewId, java.lang.String renderKitId)
          See getTreeStructureToSave.
 javax.faces.component.UIViewRoot restoreView(javax.faces.context.FacesContext facescontext, java.lang.String viewId, java.lang.String renderKitId)
           
 javax.faces.application.StateManager.SerializedView saveSerializedView(javax.faces.context.FacesContext facesContext)
           
protected  void saveSerializedViewInServletSession(javax.faces.context.FacesContext context, javax.faces.application.StateManager.SerializedView serializedView)
           
protected  java.lang.Object serializeView(javax.faces.context.FacesContext context, javax.faces.application.StateManager.SerializedView serializedView)
           
 void writeState(javax.faces.context.FacesContext facesContext, javax.faces.application.StateManager.SerializedView serializedView)
           
 void writeStateAsUrlParams(javax.faces.context.FacesContext facesContext, javax.faces.application.StateManager.SerializedView serializedView)
          MyFaces extension
 
Methods inherited from class javax.faces.application.StateManager
isSavingStateInClient
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JspStateManagerImpl

public JspStateManagerImpl()
Method Detail

getComponentStateToSave

protected java.lang.Object getComponentStateToSave(javax.faces.context.FacesContext facesContext)
Specified by:
getComponentStateToSave in class javax.faces.application.StateManager

getTreeStructureToSave

protected java.lang.Object getTreeStructureToSave(javax.faces.context.FacesContext facesContext)
Return an object which contains info about the UIComponent type of each node in the view tree. This allows an identical UIComponent tree to be recreated later, though all the components will have just default values for their members.

Specified by:
getTreeStructureToSave in class javax.faces.application.StateManager

restoreComponentState

protected void restoreComponentState(javax.faces.context.FacesContext facesContext,
                                     javax.faces.component.UIViewRoot uiViewRoot,
                                     java.lang.String renderKitId)
Given a tree of UIComponent objects created the default constructor for each node, retrieve saved state info (from either the client or the server) and walk the tree restoring the members of each node from the saved state information.

Specified by:
restoreComponentState in class javax.faces.application.StateManager

restoreTreeStructure

protected javax.faces.component.UIViewRoot restoreTreeStructure(javax.faces.context.FacesContext facesContext,
                                                                java.lang.String viewId,
                                                                java.lang.String renderKitId)
See getTreeStructureToSave.

Specified by:
restoreTreeStructure in class javax.faces.application.StateManager

restoreView

public javax.faces.component.UIViewRoot restoreView(javax.faces.context.FacesContext facescontext,
                                                    java.lang.String viewId,
                                                    java.lang.String renderKitId)
Specified by:
restoreView in class javax.faces.application.StateManager

saveSerializedView

public javax.faces.application.StateManager.SerializedView saveSerializedView(javax.faces.context.FacesContext facesContext)
                                                                       throws java.lang.IllegalStateException
Specified by:
saveSerializedView in class javax.faces.application.StateManager
Throws:
java.lang.IllegalStateException

writeState

public void writeState(javax.faces.context.FacesContext facesContext,
                       javax.faces.application.StateManager.SerializedView serializedView)
                throws java.io.IOException
Specified by:
writeState in class javax.faces.application.StateManager
Throws:
java.io.IOException

writeStateAsUrlParams

public void writeStateAsUrlParams(javax.faces.context.FacesContext facesContext,
                                  javax.faces.application.StateManager.SerializedView serializedView)
                           throws java.io.IOException
MyFaces extension

Specified by:
writeStateAsUrlParams in class MyfacesStateManager
Parameters:
facesContext -
serializedView -
Throws:
java.io.IOException

getRenderKitFactory

protected javax.faces.render.RenderKitFactory getRenderKitFactory()

saveSerializedViewInServletSession

protected void saveSerializedViewInServletSession(javax.faces.context.FacesContext context,
                                                  javax.faces.application.StateManager.SerializedView serializedView)

getSerializedViewFromServletSession

protected javax.faces.application.StateManager.SerializedView getSerializedViewFromServletSession(javax.faces.context.FacesContext context,
                                                                                                  java.lang.String viewId,
                                                                                                  java.lang.String sequenceStr)

serializeView

protected java.lang.Object serializeView(javax.faces.context.FacesContext context,
                                         javax.faces.application.StateManager.SerializedView serializedView)

isSerializeStateInSession

protected boolean isSerializeStateInSession(javax.faces.context.FacesContext context)
Reads the value of the org.apache.myfaces.SERIALIZE_STATE_IN_SESSION context parameter.

Parameters:
context - FacesContext for the request we are processing.
Returns:
boolean true, if the server state should be serialized in the session
See Also:
SERIALIZE_STATE_IN_SESSION_PARAM

isCompressStateInSession

protected boolean isCompressStateInSession(javax.faces.context.FacesContext context)
Reads the value of the org.apache.myfaces.COMPRESS_STATE_IN_SESSION context parameter.

Parameters:
context - FacesContext for the request we are processing.
Returns:
boolean true, if the server state steam should be compressed
See Also:
COMPRESS_SERVER_STATE_PARAM

deserializeView

protected javax.faces.application.StateManager.SerializedView deserializeView(java.lang.Object state)


Copyright © 2011 Apache Software Foundation. All Rights Reserved.