ResponseStateManager
is the helper class to javax.faces.application.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.
| Modifier and Type | Field and Description |
|---|---|
| public static final String | CLIENT_WINDOW_PARAM
The name of the hidden field that refers to the encoded ClientWindow. |
| public static final String | CLIENT_WINDOW_URL_PARAM
The name of the URL query parameter for transmitting
the client window id. This parameter is only used if
|
| private static Logger | |
| public static final String | NON_POSTBACK_VIEW_TOKEN_PARAM
The value of this constant is taken
to be the name of a request parameter whose value is inspected
to verify the safety of an incoming non-postback request with respect
to the currently configured |
| public static final String | RENDER_KIT_ID_PARAM
The name of the request parameter used by the default
implementation of |
| public static final String | VIEW_STATE_PARAM
Implementations must use this constant field value as the name of the client parameter in which to save the state between requests. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Object | Returns: the component state portion of the stateThe context)FacesContext instance for the current request
Deprecated
This method has been replaced by
getState.
The implementation must inspect the current request and return
the component state Object passed to it on a previous invocation
of |
| public String | Returns: a cryptographically strong valuethe context)FacesContext for the current requestCompliant implementations must return a cryptographically strong token for use to protect views in this application. |
| public Object | Returns: the tree structure and component state Object passed in towriteState. If this is an initial request, this
method returns null.The context, String FacesContext instance for the current requestView identifier of the view to be restored viewId)The implementation must
inspect the current request and return
an Object representing the tree structure and component state
passed in to a previous invocation of |
| public Object | Returns: the tree structure portion of the stateThe context, String FacesContext instance for the current requestView identifier of the view to be restored viewId)
Deprecated
This method has been replaced by
getState.
The implementation must inspect the current request and return
the tree structure Object passed to it on a previous invocation of
|
| public String | Returns: the view state for this request without any markup specificsthe context, Object FacesContext for the current requestthe state from which the String version will be generated
from state)
Return the specified state as a |
| public boolean | Returns: the value as specified abovethe context)FacesContext for the current request.Return true if the current request is a postback. |
| public boolean | Returns: the value of the statelessness of this run through the lifecycle.The context, String FacesContext instance for the current requestView identifier of the view to be restored viewId)If the preceding call to |
| public void | writeState(FacesContext
The context, Object FacesContext instance for the current requestThe serialized state information previously saved state)Take the argument
|
| public void | writeState(FacesContext
The context, StateManager.FacesContext instance for the current requestThe serialized state information previously saved state
Deprecated
This method has been replaced by
writeState(javax.faces.context.FacesContext, java.lang.Object).
Take the argument |
| CLIENT_WINDOW_PARAM | back to summary |
|---|---|
| public static final String CLIENT_WINDOW_PARAM The name of the hidden field that
refers to the encoded ClientWindow. This field is only used if
| |
| CLIENT_WINDOW_URL_PARAM | back to summary |
|---|---|
| public static final String CLIENT_WINDOW_URL_PARAM The name of the URL query parameter for transmitting
the client window id. This parameter is only used if
| |
| log | back to summary |
|---|---|
| private static Logger log | |
| NON_POSTBACK_VIEW_TOKEN_PARAM | back to summary |
|---|---|
| public static final String NON_POSTBACK_VIEW_TOKEN_PARAM The value of this constant is taken
to be the name of a request parameter whose value is inspected
to verify the safety of an incoming non-postback request with respect
to the currently configured
| |
| RENDER_KIT_ID_PARAM | back to summary |
|---|---|
| public static final String RENDER_KIT_ID_PARAM The name of the request parameter used by the default
implementation of | |
| VIEW_STATE_PARAM | back to summary |
|---|---|
| public static final String VIEW_STATE_PARAM Implementations must use this
constant field value as the name of the client parameter in which
to save the state between requests. The It is strongly recommend that implementations guard against cross site scripting attacks by at least making the value of this parameter difficult to predict.
| |
| ResponseStateManager | back to summary |
|---|---|
| public ResponseStateManager() | |
| getComponentStateToRestore | back to summary |
|---|---|
| public Object getComponentStateToRestore(FacesContext context)
Deprecated This method has been replaced by The implementation must inspect the current request and return
the component state Object passed to it on a previous invocation
of
| |
| getCryptographicallyStrongTokenFromSession | back to summary |
|---|---|
| public String getCryptographicallyStrongTokenFromSession(FacesContext context) Compliant implementations must return a
cryptographically strong token for use to protect views in this
application. For backwards compatability with earlier revisions, a
default implementation is provided that simply returns
| |
| getState | back to summary |
|---|---|
| public Object getState(FacesContext context, String viewId) The implementation must
inspect the current request and return
an Object representing the tree structure and component state
passed in to a previous invocation of If the state saving method for this
application is For backwards compatability with existing
| |
| getTreeStructureToRestore | back to summary |
|---|---|
| public Object getTreeStructureToRestore(FacesContext context, String viewId)
Deprecated This method has been replaced by The implementation must inspect the current request and return
the tree structure Object passed to it on a previous invocation of
| |
| getViewState | back to summary |
|---|---|
| public String getViewState(FacesContext context, Object state)
Return the specified state as a
| |
| isPostback | back to summary |
|---|---|
| public boolean isPostback(FacesContext context) Return true if the current request is a postback. This method
is leveraged from the Restore View Phase to determine if
The implementation of this method for the Standard HTML
RenderKit must consult the For backwards compatability with implementations of
| |
| isStateless | back to summary |
|---|---|
| public boolean isStateless(FacesContext context, String viewId) If the preceding call to To preserve backward compatibility
with custom implementations that may have extended from an earlier
version of this class, an implementation is provided that returns
| |
| writeState | back to summary |
|---|---|
| public void writeState(FacesContext context, Object state) throws IOException Take the argument
Call If the state 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. If the state saving method for this application is If the state saving method for this application is Write out the render kit identifier associated with this
For backwards compatability with existing
The
| |
| writeState | back to summary |
|---|---|
| public void writeState(FacesContext context, StateManager. Deprecated This method has been replaced by Take the argument If the If the state saving method for this application is
| |