public class FlowViewResponseStateManager
extends javax.faces.render.ResponseStateManager
A custom ResponseStateManager that writes JSF state to a Web Flow managed view-scoped variable. This class is plugged
in via FlowRenderKit
in JSF 2 runtime environments only.
In JSF 2 where a partial state saving algorithm is used, Web Flow delegates to the JSF 2 runtime to handle state
saving. However, an instance of this class plugged in via FlowRenderKit
will ensure that state is saved in a
Web Flow managed view-scoped variable.
Constructor and Description |
---|
FlowViewResponseStateManager(javax.faces.render.ResponseStateManager delegate) |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getComponentStateToRestore(javax.faces.context.FacesContext context) |
java.lang.Object |
getState(javax.faces.context.FacesContext facesContext,
java.lang.String viewId)
Retrieves the state from view scope as an instance of
FlowSerializedView and turns it to an array before
returning. |
java.lang.Object |
getTreeStructureToRestore(javax.faces.context.FacesContext context,
java.lang.String viewId) |
java.lang.String |
getViewState(javax.faces.context.FacesContext facesContext,
java.lang.Object state)
This method returns the flow execution key to be used as the value for the "javax.faces.ViewState" hidden input
field.
|
boolean |
isPostback(javax.faces.context.FacesContext context) |
void |
writeState(javax.faces.context.FacesContext facesContext,
java.lang.Object state)
Wraps state in an instance of
FlowSerializedView and stores it in view scope. |
void |
writeState(javax.faces.context.FacesContext context,
javax.faces.application.StateManager.SerializedView state) |
public FlowViewResponseStateManager(javax.faces.render.ResponseStateManager delegate)
public void writeState(javax.faces.context.FacesContext facesContext, java.lang.Object state) throws java.io.IOException
Wraps state in an instance of FlowSerializedView
and stores it in view scope.
Also complies with the contract for ResponseStateManager.writeState(FacesContext, Object)
by writing the
"javax.faces.ViewState" and optionally the "javax.faces.RenderKitId" hidden input fields to the response.
writeState
in class javax.faces.render.ResponseStateManager
java.io.IOException
public java.lang.Object getState(javax.faces.context.FacesContext facesContext, java.lang.String viewId)
Retrieves the state from view scope as an instance of FlowSerializedView
and turns it to an array before
returning.
getState
in class javax.faces.render.ResponseStateManager
public java.lang.String getViewState(javax.faces.context.FacesContext facesContext, java.lang.Object state)
getViewState
in class javax.faces.render.ResponseStateManager
public boolean isPostback(javax.faces.context.FacesContext context)
isPostback
in class javax.faces.render.ResponseStateManager
public java.lang.Object getTreeStructureToRestore(javax.faces.context.FacesContext context, java.lang.String viewId)
getTreeStructureToRestore
in class javax.faces.render.ResponseStateManager
public java.lang.Object getComponentStateToRestore(javax.faces.context.FacesContext context)
getComponentStateToRestore
in class javax.faces.render.ResponseStateManager
public void writeState(javax.faces.context.FacesContext context, javax.faces.application.StateManager.SerializedView state) throws java.io.IOException
writeState
in class javax.faces.render.ResponseStateManager
java.io.IOException