public abstract class StateManagerWrapper extends StateManager
StateManager.SerializedViewSTATE_SAVING_METHOD_CLIENT, STATE_SAVING_METHOD_PARAM_NAME, STATE_SAVING_METHOD_SERVER| Constructor and Description |
|---|
StateManagerWrapper() |
| Modifier and Type | Method and Description |
|---|---|
protected Object |
getComponentStateToSave(FacesContext context)
Return data that can be applied to a component tree created using the "getTreeStructureToSave"
method.
|
protected Object |
getTreeStructureToSave(FacesContext context)
Return data that is sufficient to recreate the component tree that is the viewroot of the specified
context, but without restoring the state in the components.
|
protected abstract StateManager |
getWrapped() |
boolean |
isSavingStateInClient(FacesContext context) |
protected void |
restoreComponentState(FacesContext context,
UIViewRoot viewRoot,
String renderKitId) |
protected UIViewRoot |
restoreTreeStructure(FacesContext context,
String viewId,
String renderKitId) |
UIViewRoot |
restoreView(FacesContext context,
String viewId,
String renderKitId) |
StateManager.SerializedView |
saveSerializedView(FacesContext context)
Invokes getTreeStructureToSave and getComponentStateToSave, then return an object that wraps the two
resulting objects.
|
Object |
saveView(FacesContext context)
Returns an object that is sufficient to recreate the component tree that is the viewroot of
the specified context.
|
void |
writeState(FacesContext context,
Object state)
Associate the provided state object with the current response being generated.
|
void |
writeState(FacesContext context,
StateManager.SerializedView state)
Associate the provided state object with the current response being generated.
|
protected abstract StateManager getWrapped()
public StateManager.SerializedView saveSerializedView(FacesContext context)
StateManagerDeprecated; use saveView instead.
saveSerializedView in class StateManagerpublic Object saveView(FacesContext context)
StateManagerThe return value is suitable for passing to method writeState.
saveView in class StateManagerpublic boolean isSavingStateInClient(FacesContext context)
isSavingStateInClient in class StateManagerprotected Object getTreeStructureToSave(FacesContext context)
StateManagerUsing this data, a tree of components which has the same "shape" as the original component tree can be recreated. However the component instances themselves will have only their default values, ie their member fields will not have been set to the original values.
Deprecated; use saveView instead.
getTreeStructureToSave in class StateManagerprotected Object getComponentStateToSave(FacesContext context)
StateManagerDeprecated; use saveView instead.
getComponentStateToSave in class StateManagerpublic void writeState(FacesContext context, StateManager.SerializedView state) throws IOException
StateManagerWhen 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.
Deprecated; use writeState(FacesContext, Object) instead. This method was abstract in JSF1.1, but is now an empty non-abstract method so that old classes that implement this method continue to work, while new classes can just override the new writeState method rather than this one.
writeState in class StateManagerIOExceptionpublic void writeState(FacesContext context, Object state) throws IOException
StateManagerWhen 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 JSF1.1 API to continue to work.
writeState in class StateManagerIOExceptionpublic UIViewRoot restoreView(FacesContext context, String viewId, String renderKitId)
restoreView in class StateManagerprotected UIViewRoot restoreTreeStructure(FacesContext context, String viewId, String renderKitId)
restoreTreeStructure in class StateManagerprotected void restoreComponentState(FacesContext context, UIViewRoot viewRoot, String renderKitId)
restoreComponentState in class StateManagerCopyright © 2013 Apache Software Foundation. All Rights Reserved.