Overview | Package | Class | Tree | Deprecated | Index | Help
| Spring Web Flow
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.springframework.faces.webflow
Class FlowViewResponseStateManager

    java.lang.Object
      javax.faces.render.ResponseStateManager
          org.springframework.faces.webflow.FlowViewResponseStateManager

    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.

Since:
  2.2.0
Author:
  Rossen Stoyanchev

Field Summary

Fields inherited from class javax.faces.render.ResponseStateManager
`CLIENT_WINDOW_PARAM, CLIENT_WINDOW_URL_PARAM, NON_POSTBACK_VIEW_TOKEN_PARAM, RENDER_KIT_ID_PARAM, VIEW_STATE_PARAM`

Constructor Summary
`FlowViewResponseStateManager(javax.faces.render.ResponseStateManager delegate)`

Method Summary
`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)`

Methods inherited from class javax.faces.render.ResponseStateManager
`getCryptographicallyStrongTokenFromSession, isStateless`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### FlowViewResponseStateManager

    public FlowViewResponseStateManager(javax.faces.render.ResponseStateManager delegate)

Method Detail

### writeState

    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.

  Overrides:
    `writeState` in class `javax.faces.render.ResponseStateManager`
  Throws:
    `java.io.IOException`

### getState

    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.

  Overrides:
    `getState` in class `javax.faces.render.ResponseStateManager`

### getViewState

    public 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. The value of this key is not important because JSF state is stored in a Web Flow managed view scoped variable. However the presence of the view state parameter alone is important for triggering actions. Hence we return the most logical value, which is the flow execution key.

  Overrides:
    `getViewState` in class `javax.faces.render.ResponseStateManager`

### isPostback

    public boolean isPostback(javax.faces.context.FacesContext context)

  Overrides:
    `isPostback` in class `javax.faces.render.ResponseStateManager`

### getTreeStructureToRestore

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

  Overrides:
    `getTreeStructureToRestore` in class `javax.faces.render.ResponseStateManager`

### getComponentStateToRestore

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

  Overrides:
    `getComponentStateToRestore` in class `javax.faces.render.ResponseStateManager`

### writeState

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

  Overrides:
    `writeState` in class `javax.faces.render.ResponseStateManager`
  Throws:
    `java.io.IOException`

Overview | Package | Class | Tree | Deprecated | Index | Help
| Spring Web Flow
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD