- java.lang.Object
-
- javax.faces.application.StateManager
-
- javax.faces.application.StateManagerWrapper
-
- All Implemented Interfaces:
- FacesWrapper<StateManager>
public abstract class StateManagerWrapper extends StateManager implements FacesWrapper<StateManager>
Provides a simple implementation of
StateManager
that can be subclassed by developers wishing to provide specialized behavior to an existingStateManager
instance. The default implementation of all methods is to call through to the wrappedStateManager
.Usage: extend this class and override
getWrapped()
to return the instance we are wrapping.- Since:
- 1.2
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class javax.faces.application.StateManager
StateManager.SerializedView
-
-
Field Summary
-
Fields inherited from class javax.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 Constructor and Description StateManagerWrapper()
-
Method Summary
-
-
-
Method Detail
-
getWrapped
public abstract StateManager 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 that we are wrapping.
-
saveSerializedView
public StateManager.SerializedView saveSerializedView(FacesContext context)
The default behavior of this method is to call
StateManager.saveSerializedView(javax.faces.context.FacesContext)
on the wrappedStateManager
object.- Overrides:
saveSerializedView
in classStateManager
- Parameters:
context
-FacesContext
for the current request- Since:
- 1.2
- See Also:
StateManager.saveSerializedView(javax.faces.context.FacesContext)
-
saveView
public Object saveView(FacesContext context)
The default behavior of this method is to call
StateManager.saveView(javax.faces.context.FacesContext)
on the wrappedStateManager
object.- Overrides:
saveView
in classStateManager
- Parameters:
context
-FacesContext
for the current request- Since:
- 1.2
- See Also:
StateManager.saveView(javax.faces.context.FacesContext)
-
getTreeStructureToSave
protected Object getTreeStructureToSave(FacesContext context)
The default behavior of this method is to call
StateManager.getTreeStructureToSave(javax.faces.context.FacesContext)
on the wrappedStateManager
object.- Overrides:
getTreeStructureToSave
in classStateManager
- Parameters:
context
-FacesContext
for the current request- Since:
- 1.2
- See Also:
StateManager.getTreeStructureToSave(javax.faces.context.FacesContext)
-
getComponentStateToSave
protected Object getComponentStateToSave(FacesContext context)
The default behavior of this method is to call
StateManager.getComponentStateToSave(javax.faces.context.FacesContext)
on the wrappedStateManager
object.- Overrides:
getComponentStateToSave
in classStateManager
- Parameters:
context
-FacesContext
for the current request- Since:
- 1.2
- See Also:
StateManager.getComponentStateToSave(javax.faces.context.FacesContext)
-
writeState
public void writeState(FacesContext context, Object state) throws IOException
The default behavior of this method is to call
StateManager.writeState(javax.faces.context.FacesContext, java.lang.Object)
on the wrappedStateManager
object.- Overrides:
writeState
in classStateManager
- Parameters:
context
-FacesContext
for the current requeststate
- the Serializable state to be written, as returned byStateManager.saveSerializedView(javax.faces.context.FacesContext)
- Throws:
IOException
- Since:
- 1.2
- See Also:
StateManager.writeState(javax.faces.context.FacesContext, java.lang.Object)
-
writeState
public void writeState(FacesContext context, StateManager.SerializedView state) throws IOException
The default behavior of this method is to call
StateManager.writeState(javax.faces.context.FacesContext, javax.faces.application.StateManager.SerializedView)
on the wrappedStateManager
object.- Overrides:
writeState
in classStateManager
- Parameters:
context
-FacesContext
for the current requeststate
- the serialized state to be written- Throws:
IOException
- Since:
- 1.2
- See Also:
StateManager.writeState(javax.faces.context.FacesContext, javax.faces.application.StateManager.SerializedView)
-
restoreView
public UIViewRoot restoreView(FacesContext context, String viewId, String renderKitId)
The default behavior of this method is to call
StateManager.restoreView(javax.faces.context.FacesContext, String, String)
on the wrappedStateManager
object.- Specified by:
restoreView
in classStateManager
- Parameters:
context
-FacesContext
for the current requestviewId
- View identifier of the view to be restoredrenderKitId
- the renderKitId used to render this response. Must not benull
.- Since:
- 1.2
- See Also:
StateManager.restoreView(javax.faces.context.FacesContext, String, String)
-
restoreTreeStructure
protected UIViewRoot restoreTreeStructure(FacesContext context, String viewId, String renderKitId)
The default behavior of this method is to call
StateManager.restoreTreeStructure(javax.faces.context.FacesContext, String, String)
on the wrappedStateManager
object.- Overrides:
restoreTreeStructure
in classStateManager
- Parameters:
context
-FacesContext
for the current requestviewId
- View identifier of the view to be restoredrenderKitId
- the renderKitId used to render this response. Must not benull
.- Since:
- 1.2
- See Also:
StateManager.restoreTreeStructure(javax.faces.context.FacesContext, String, String)
-
restoreComponentState
protected void restoreComponentState(FacesContext context, UIViewRoot viewRoot, String renderKitId)
The default behavior of this method is to call
StateManager.restoreComponentState(javax.faces.context.FacesContext, javax.faces.component.UIViewRoot, String)
on the wrappedStateManager
object.- Overrides:
restoreComponentState
in classStateManager
- Parameters:
context
-FacesContext
for the current requestviewRoot
-UIViewRoot
returned by a previous call torestoreTreeStructure()
renderKitId
- the renderKitId used to render this response. Must not benull
.- Since:
- 1.2
- See Also:
StateManager.restoreComponentState(javax.faces.context.FacesContext, javax.faces.component.UIViewRoot, String)
-
isSavingStateInClient
public boolean isSavingStateInClient(FacesContext context)
The default behavior of this method is to call
StateManager.isSavingStateInClient(javax.faces.context.FacesContext)
on the wrappedStateManager
object.- Overrides:
isSavingStateInClient
in classStateManager
- Returns:
true
if and only if the value of theServletContext
init parameter named by the value of the constantStateManager.STATE_SAVING_METHOD_PARAM_NAME
is equal to the value of the constantStateManager.STATE_SAVING_METHOD_CLIENT
.false
otherwise.- Since:
- 1.2
- See Also:
StateManager.isSavingStateInClient(javax.faces.context.FacesContext)
-
getViewState
public String getViewState(FacesContext context)
The default behavior of this method is to call
StateManager.getViewState(javax.faces.context.FacesContext)
on the wrappedStateManager
object.- Overrides:
getViewState
in classStateManager
- Parameters:
context
-FacesContext
for the current request- Since:
- 2.0
-
-
Traduction non disponible
Les API Java ne sont pas encore traduites en français sur l'infobrol. Seule la version anglaise est disponible pour l'instant.
Version en cache
21/08/2025 15:07:53 Cette version de la page est en cache (à la date du 21/08/2025 15:07:53) afin d'accélérer le traitement.Vous pouvez activer le mode utilisateur dans le menu en haut pour afficher la version plus récente de la page.
Document créé le 14/04/2008, dernière modification le 18/08/2025
Source du document imprimé : https://www.gaudry.be/java-api-javaee-rf-javax/faces/application/StateManagerWrapper.html
L'infobrol est un site personnel dont le contenu n'engage que moi. Le texte est mis à disposition sous licence CreativeCommons(BY-NC-SA). Plus d'info sur les conditions d'utilisation et sur l'auteur.
Références
Ces références et liens indiquent des documents consultés lors de la rédaction de cette page, ou qui peuvent apporter un complément d'information, mais les auteurs de ces sources ne peuvent être tenus responsables du contenu de cette page.
L'auteur de ce site est seul responsable de la manière dont sont présentés ici les différents concepts, et des libertés qui sont prises avec les ouvrages de référence. N'oubliez pas que vous devez croiser les informations de sources multiples afin de diminuer les risques d'erreurs.