This StateHelper provides the functionality associated with server-side state saving,
though in actuallity, it is a hybrid between client and server.
| Modifier and Type | Field and Description |
|---|---|
| protected boolean | generateUniqueStateIds
Flag determining how server state IDs are generated. |
| private static final Logger | |
| public static final String | LOGICAL_VIEW_MAP
The top level attribute name for storing the state structures within the session. |
| protected final Integer | numberOfLogicalViews
The number of logical views as configured by the user. |
| protected final Integer | numberOfViews
The number of views as configured by the user. |
| protected final SecureRandom | random
Used to generate unique server state IDs. |
| public static final String | STATEMANAGED_SERIAL_ID_KEY
Key to store the |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private String | Returns: a unique ID for building the keys used to store views within a sessionthe ctx)FacesContext for the current request
|
| private String | |
| protected Integer | Returns: the Integer representation of the parameter valuethe paramter to parse paramUtility method for obtaining the |
| public Object | getState(FacesContext ctx, String viewId)
Implements abstract com. Inspects the incoming request parameters for the standardized state parameter name. |
| protected Object | Returns: an object that can be passed toUIViewRoot.processRestoreState.
If com.sun.faces.config.WebConfiguration.BooleanWebContextInitParameter#SerializeServerStateDeprecated de-serialize the
state prior to returning it, otherwise return state as is.the state as it was stored in the session state)
|
| protected Object | Returns: Ifcom.sun.faces.config.WebConfiguration.BooleanWebContextInitParameter#SerializeServerStateDeprecated is
true, serialize and return the state, otherwise, return
state unchanged.the object returned from state)UIView.processSaveState
|
| public boolean | Returns: true if stateless, false otherwise.the Faces context. facesContext, String the view id. viewId)Implements abstract com. |
| public void | writeState(FacesContext ctx, Object state, StringBuilder stateCapture)
Implements abstract com.
Stores the provided state within the session obtained from the provided
If |
| generateUniqueStateIds | back to summary |
|---|---|
| protected boolean generateUniqueStateIds Flag determining how server state IDs are generated. | |
| LOGGER | back to summary |
|---|---|
| private static final Logger LOGGER | |
| LOGICAL_VIEW_MAP | back to summary |
|---|---|
| public static final String LOGICAL_VIEW_MAP The top level attribute name for storing the state structures within the session. | |
| numberOfLogicalViews | back to summary |
|---|---|
| protected final Integer numberOfLogicalViews The number of logical views as configured by the user. | |
| numberOfViews | back to summary |
|---|---|
| protected final Integer numberOfViews The number of views as configured by the user. | |
| random | back to summary |
|---|---|
| protected final SecureRandom random Used to generate unique server state IDs. | |
| STATEMANAGED_SERIAL_ID_KEY | back to summary |
|---|---|
| public static final String STATEMANAGED_SERIAL_ID_KEY Key to store the | |
| ServerSideStateHelper | back to summary |
|---|---|
| public ServerSideStateHelper() Construct a new | |
| createIncrementalRequestId | back to summary |
|---|---|
private String createIncrementalRequestId(FacesContext ctx)
| |
| createRandomId | back to summary |
|---|---|
| private String createRandomId() | |
| getIntegerConfigValue | back to summary |
|---|---|
| protected Integer getIntegerConfigValue(WebConfiguration. Utility method for obtaining the
| |
| getState | back to summary |
|---|---|
| public Object getState(FacesContext ctx, String viewId) Implements abstract com. Inspects the incoming request parameters for the standardized state parameter name. In this case, the parameter value will be the composite ID generated by ServerSideStateHelper#writeState(FacesContext, Object, StringBuilder). The composite key will be used to find the appropriate view within the
session obtained from the provided
| |
| handleRestoreState | back to summary |
|---|---|
protected Object handleRestoreState(Object state)
| |
| handleSaveState | back to summary |
|---|---|
protected Object handleSaveState(Object state)
| |
| isStateless | back to summary |
|---|---|
| public boolean isStateless(FacesContext facesContext, String viewId) throws IllegalStateException Implements abstract com. Is stateless.
| |
| writeState | back to summary |
|---|---|
| public void writeState(FacesContext ctx, Object state, StringBuilder stateCapture) throws IOException Implements abstract com.
Stores the provided state within the session obtained from the provided
If If | |