Class FlowResponseStateManager

java.lang.Object
jakarta.faces.render.ResponseStateManager
org.springframework.faces.webflow.FlowResponseStateManager
All Implemented Interfaces:
jakarta.faces.FacesWrapper<jakarta.faces.render.ResponseStateManager>

public class FlowResponseStateManager extends jakarta.faces.render.ResponseStateManager implements jakarta.faces.FacesWrapper<jakarta.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.
Since:
2.2.0
Author:
Rossen Stoyanchev, Phillip Webb
  • Field Summary

    Fields inherited from class jakarta.faces.render.ResponseStateManager

    CLIENT_WINDOW_PARAM, CLIENT_WINDOW_URL_PARAM, NON_POSTBACK_VIEW_TOKEN_PARAM, RENDER_KIT_ID_PARAM, VIEW_STATE_PARAM
  • Constructor Summary

    Constructors
    Constructor
    Description
    FlowResponseStateManager(jakarta.faces.render.ResponseStateManager wrapped)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    getCryptographicallyStrongTokenFromSession(jakarta.faces.context.FacesContext context)
     
    getState(jakarta.faces.context.FacesContext facesContext, String viewId)
     
    getViewState(jakarta.faces.context.FacesContext facesContext, Object state)
    This method returns the flow execution key to be used as the value for the "jakarta.faces.ViewState" hidden input field.
    jakarta.faces.render.ResponseStateManager
     
    boolean
    isPostback(jakarta.faces.context.FacesContext context)
     
    boolean
    isStateless(jakarta.faces.context.FacesContext context, String viewId)
     
    void
    writeState(jakarta.faces.context.FacesContext facesContext, Object state)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • FlowResponseStateManager

      public FlowResponseStateManager(jakarta.faces.render.ResponseStateManager wrapped)
  • Method Details

    • getWrapped

      public jakarta.faces.render.ResponseStateManager getWrapped()
      Specified by:
      getWrapped in interface jakarta.faces.FacesWrapper<jakarta.faces.render.ResponseStateManager>
    • isStateless

      public boolean isStateless(jakarta.faces.context.FacesContext context, String viewId)
      Overrides:
      isStateless in class jakarta.faces.render.ResponseStateManager
    • writeState

      public void writeState(jakarta.faces.context.FacesContext facesContext, Object state) throws IOException
      Overrides:
      writeState in class jakarta.faces.render.ResponseStateManager
      Throws:
      IOException
    • getState

      public Object getState(jakarta.faces.context.FacesContext facesContext, String viewId)
      Overrides:
      getState in class jakarta.faces.render.ResponseStateManager
    • getViewState

      public String getViewState(jakarta.faces.context.FacesContext facesContext, Object state)
      This method returns the flow execution key to be used as the value for the "jakarta.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 jakarta.faces.render.ResponseStateManager
    • isPostback

      public boolean isPostback(jakarta.faces.context.FacesContext context)
      Overrides:
      isPostback in class jakarta.faces.render.ResponseStateManager
    • getCryptographicallyStrongTokenFromSession

      public String getCryptographicallyStrongTokenFromSession(jakarta.faces.context.FacesContext context)
      Overrides:
      getCryptographicallyStrongTokenFromSession in class jakarta.faces.render.ResponseStateManager