javax.faces.render
Class ResponseStateManager

java.lang.Object
  |
  +--javax.faces.render.ResponseStateManager

public abstract class ResponseStateManager
extends java.lang.Object

ResponseStateManager is the helper class to StateManager that knows the specific rendering technology being used to generate the response. It is a singleton abstract class, vended by the RenderKit. This class knows the mechanics of saving state, whether it be in hidden fields, session, or some combination of the two.


Constructor Summary
ResponseStateManager()
           
 
Method Summary
abstract  java.lang.Object getComponentStateToRestore(javax.faces.context.FacesContext context)
          The implementation must inspect the current request and return the component state Object passed to it on a previous invocation of writeState().
abstract  java.lang.Object getTreeStructureToRestore(javax.faces.context.FacesContext context, java.lang.String viewId)
          The implementation must inspect the current request and return the tree structure Object passed to it on a previous invocation of writeState().
abstract  void writeState(javax.faces.context.FacesContext context, javax.faces.application.StateManager.SerializedView state)
          Take the argument state and write it into the output using the current ResponseWriter, which must be correctly positioned already.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResponseStateManager

public ResponseStateManager()
Method Detail

writeState

public abstract void writeState(javax.faces.context.FacesContext context,
                                javax.faces.application.StateManager.SerializedView state)
                         throws java.io.IOException

Take the argument state and write it into the output using the current ResponseWriter, which must be correctly positioned already.

If the StateManager.SerializedView is to be written out to hidden fields, the implementation must take care to make all necessary character replacements to make the Strings suitable for inclusion as an HTTP request paramater.

Parameters:
context - The FacesContext instance for the current request
state - The serialized state information previously saved
java.io.IOException

getTreeStructureToRestore

public abstract java.lang.Object getTreeStructureToRestore(javax.faces.context.FacesContext context,
                                                           java.lang.String viewId)

The implementation must inspect the current request and return the tree structure Object passed to it on a previous invocation of writeState().

Parameters:
context - The FacesContext instance for the current request
viewId - View identifier of the view to be restored
Returns:
the tree structure Object passed in to writeState. If this is the initial request, this method returns null.

getComponentStateToRestore

public abstract java.lang.Object getComponentStateToRestore(javax.faces.context.FacesContext context)

The implementation must inspect the current request and return the component state Object passed to it on a previous invocation of writeState().

Parameters:
context - The FacesContext instance for the current request
Returns:
the component state Object passed in to writeState.


Copyright ? 2002-2004 Sun Microsystems, Inc. All Rights Reserved.