StateManagerWrapper (Java EE 5 SDK)

Java

Java EE 5 SDK

深圳电信培训中心.徐海蛟老师.


javax.faces.application Class StateManagerWrapper

java.lang.Object
  extended by javax.faces.application.StateManager
      extended by javax.faces.application.StateManagerWrapper

public abstract class StateManagerWrapper
extends StateManager

Provides a simple implementation of StateManager that can be subclassed by developers wishing to provide specialized behavior to an existing StateManager instance. The default implementation of all methods is to call through to the wrapped StateManager.

Usage: extend this class and override getWrapped() to return the instance we are wrapping.

从以下版本开始:
1.2

嵌套类摘要
 
Nested classes/interfaces inherited from class javax.faces.application.StateManager
StateManager.SerializedView
 
字段摘要
 
Fields inherited from class javax.faces.application.StateManager
STATE_SAVING_METHOD_CLIENT, STATE_SAVING_METHOD_PARAM_NAME, STATE_SAVING_METHOD_SERVER
 
构造器摘要
StateManagerWrapper()
           
 
方法摘要
protected  Object getComponentStateToSave(FacesContext context)
          The default behavior of this method is to call StateManager.getComponentStateToSave(javax.faces.context.FacesContext) on the wrapped StateManager object.
protected  Object getTreeStructureToSave(FacesContext context)
          The default behavior of this method is to call StateManager.getTreeStructureToSave(javax.faces.context.FacesContext) on the wrapped StateManager object.
protected abstract  StateManager getWrapped()
           
 boolean isSavingStateInClient(FacesContext context)
          The default behavior of this method is to call StateManager.isSavingStateInClient(javax.faces.context.FacesContext) on the wrapped StateManager object.
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 wrapped StateManager object.
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 wrapped StateManager object.
 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 wrapped StateManager object.
 StateManager.SerializedView saveSerializedView(FacesContext context)
          The default behavior of this method is to call StateManager.saveSerializedView(javax.faces.context.FacesContext) on the wrapped StateManager object.
 Object saveView(FacesContext context)
          The default behavior of this method is to call StateManager.saveView(javax.faces.context.FacesContext) on the wrapped StateManager object.
 void writeState(FacesContext context, Object state)
          The default behavior of this method is to call StateManager.writeState(javax.faces.context.FacesContext, java.lang.Object) on the wrapped StateManager object.
 void writeState(FacesContext context, StateManager.SerializedView state)
          The default behavior of this method is to call StateManager.writeState(javax.faces.context.FacesContext, javax.faces.application.StateManager.SerializedView) on the wrapped StateManager object.
 
类方法继承 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造器详细信息

StateManagerWrapper

public StateManagerWrapper()
方法详细信息

getWrapped

protected abstract StateManager getWrapped()
返回:
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 wrapped StateManager object.

重写:
saveSerializedView in class StateManager
参数:
context - FacesContext for the current request
从以下版本开始:
1.2
另请参见:
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 wrapped StateManager object.

重写:
saveView in class StateManager
参数:
context - FacesContext for the current request
从以下版本开始:
1.2
另请参见:
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 wrapped StateManager object.

重写:
getTreeStructureToSave in class StateManager
参数:
context - FacesContext for the current request
从以下版本开始:
1.2
另请参见:
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 wrapped StateManager object.

重写:
getComponentStateToSave in class StateManager
参数:
context - FacesContext for the current request
从以下版本开始:
1.2
另请参见:
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 wrapped StateManager object.

重写:
writeState in class StateManager
参数:
context - FacesContext for the current request
state - the Serializable state to be written, as returned by StateManager.saveSerializedView(javax.faces.context.FacesContext)
抛出异常:
IOException
从以下版本开始:
1.2
另请参见:
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 wrapped StateManager object.

重写:
writeState in class StateManager
参数:
context - FacesContext for the current request
state - the serialized state to be written
抛出异常:
IOException
从以下版本开始:
1.2
另请参见:
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 wrapped StateManager object.

规范说明:
restoreView in class StateManager
参数:
context - FacesContext for the current request
viewId - View identifier of the view to be restored
renderKitId - the renderKitId used to render this response. Must not be null.
从以下版本开始:
1.2
另请参见:
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 wrapped StateManager object.

重写:
restoreTreeStructure in class StateManager
参数:
context - FacesContext for the current request
viewId - View identifier of the view to be restored
renderKitId - the renderKitId used to render this response. Must not be null.
从以下版本开始:
1.2
另请参见:
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 wrapped StateManager object.

重写:
restoreComponentState in class StateManager
参数:
context - FacesContext for the current request
viewRoot - UIViewRoot returned by a previous call to restoreTreeStructure()
renderKitId - the renderKitId used to render this response. Must not be null.
从以下版本开始:
1.2
另请参见:
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 wrapped StateManager object.

重写:
isSavingStateInClient in class StateManager
返回:
true if and only if the value of the ServletContext init parameter named by the value of the constant StateManager.STATE_SAVING_METHOD_PARAM_NAME is equal to the value of the constant StateManager.STATE_SAVING_METHOD_CLIENT. false otherwise.
从以下版本开始:
1.2
另请参见:
StateManager.isSavingStateInClient(javax.faces.context.FacesContext)

Java EE 5 SDK

深圳电信培训中心.徐海蛟老师.


提交错误或意见

版权所有 2007 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。深圳电信培训中心.徐海蛟老师教学参考.