Class StateManagementStrategy

java.lang.Object
javax.faces.view.StateManagementStrategy

public abstract class StateManagementStrategy extends Object

Encapsulate the saving and restoring of the view to enable the VDL to take over the responsibility for handling this feature. Because ViewDeclarationLanguage.getStateManagementStrategy(javax.faces.context.FacesContext, java.lang.String) is required to return null for JSP views and non-null for views authored in Facelets for JSF 2, this specification only applys to Facelets for JSF 2.

Implementations must call UIComponent.visitTree(javax.faces.component.visit.VisitContext, javax.faces.component.visit.VisitCallback) on the UIViewRoot to perform the saving and restoring of the view in the saveView(javax.faces.context.FacesContext) and restoreView(javax.faces.context.FacesContext, java.lang.String, java.lang.String) methods, respectively.

Since:
2.0
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract UIViewRoot
    restoreView(FacesContext context, String viewId, String renderKitId)
    Restore the state of the view with information in the request.
    abstract Object
    Return the state of the current view in an Object that implements Serializable and can be passed to java.io.ObjectOutputStream.writeObject() without causing a java.io.NotSerializableException to be thrown. The default implementation must perform the following algorithm or its semantic equivalent, explicitly performing all the steps listed here.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait