Package jakarta.faces.application
Class StateManagerWrapper
java.lang.Object
jakarta.faces.application.StateManager
jakarta.faces.application.StateManagerWrapper
- All Implemented Interfaces:
FacesWrapper<StateManager>
public abstract class StateManagerWrapper
extends StateManager
implements FacesWrapper<StateManager>
see Javadoc of Faces Specification
-
Field Summary
Fields inherited from class jakarta.faces.application.StateManager
FULL_STATE_SAVING_VIEW_IDS_PARAM_NAME, IS_BUILDING_INITIAL_STATE, IS_SAVING_STATE, PARTIAL_STATE_SAVING_PARAM_NAME, SERIALIZE_SERVER_STATE_PARAM_NAME, STATE_SAVING_METHOD_CLIENT, STATE_SAVING_METHOD_PARAM_NAME, STATE_SAVING_METHOD_SERVER
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetViewState
(FacesContext context) This method should be called from somewhere when ajax response is created to update the state saving param on client.A class that implements this interface uses this method to return an instance of the class being wrapped.boolean
isSavingStateInClient
(FacesContext context) void
writeState
(FacesContext context, Object state) Associate the provided state object with the current response being generated.
-
Constructor Details
-
StateManagerWrapper
-
-
Method Details
-
getWrapped
Description copied from interface:FacesWrapper
A class that implements this interface uses this method to return an instance of the class being wrapped.- Specified by:
getWrapped
in interfaceFacesWrapper<StateManager>
- Returns:
- the instance of the class being wrapped
-
isSavingStateInClient
- Overrides:
isSavingStateInClient
in classStateManager
-
getViewState
Description copied from class:StateManager
This method should be called from somewhere when ajax response is created to update the state saving param on client. The place where this method is called is an implementation detail, so there is no references about from where in the spec javadoc.- Overrides:
getViewState
in classStateManager
- Returns:
-
writeState
Description copied from class:StateManager
Associate the provided state object with the current response being generated.When client-side state is enabled, it is expected that method writes the data contained in the state parameter to the response somehow.
When server-side state is enabled, at most a "token" is expected to be written.
This method should be overridden by subclasses. It is not abstract because a default implementation is provided that forwards to the old writeState method; this allows subclasses of StateManager written using the Faces1.1 API to continue to work.
- Overrides:
writeState
in classStateManager
- Throws:
IOException
-