org.ajax4jsf.application
Class AjaxStateManager
java.lang.Object
javax.faces.application.StateManager
org.ajax4jsf.application.AjaxStateManager
public class AjaxStateManager
- extends javax.faces.application.StateManager
- Author:
- shura
Nested classes/interfaces inherited from class javax.faces.application.StateManager |
javax.faces.application.StateManager.SerializedView |
Fields inherited from class javax.faces.application.StateManager |
STATE_SAVING_METHOD_CLIENT, STATE_SAVING_METHOD_PARAM_NAME, STATE_SAVING_METHOD_SERVER |
Constructor Summary |
AjaxStateManager(javax.faces.application.StateManager parent)
|
Method Summary |
protected java.lang.Object[] |
buildViewState(javax.faces.context.FacesContext context)
|
protected java.lang.Object |
getComponentStateToSave(javax.faces.context.FacesContext context)
|
protected java.lang.String |
getLogicalViewId(javax.faces.context.FacesContext context)
Return logical Id for current request view state. |
protected javax.faces.render.RenderKit |
getRenderKit(javax.faces.context.FacesContext context)
|
protected javax.faces.render.RenderKit |
getRenderKit(javax.faces.context.FacesContext context,
java.lang.String renderKitId)
|
protected org.ajax4jsf.application.StateHolder |
getStateHolder(javax.faces.context.FacesContext context)
|
protected java.lang.Object |
getTreeStructureToSave(javax.faces.context.FacesContext context)
|
boolean |
isSavingStateInClient(javax.faces.context.FacesContext context)
|
protected void |
restoreComponentState(javax.faces.context.FacesContext context,
javax.faces.component.UIViewRoot viewRoot,
java.lang.String renderKitId)
|
protected java.lang.String |
restoreLogicalViewId(javax.faces.context.FacesContext context,
java.lang.String viewId,
java.lang.String renderKitId)
Restore logical view id from request. |
protected java.lang.Object[] |
restoreStateFromSession(javax.faces.context.FacesContext context,
java.lang.String viewId,
java.lang.String renderKitId)
|
protected javax.faces.component.UIViewRoot |
restoreTreeStructure(javax.faces.context.FacesContext context,
java.lang.String viewId,
java.lang.String renderKitId)
|
javax.faces.component.UIViewRoot |
restoreView(javax.faces.context.FacesContext context,
java.lang.String viewId,
java.lang.String renderKitId)
|
javax.faces.application.StateManager.SerializedView |
saveSerializedView(javax.faces.context.FacesContext context)
|
protected java.lang.Object[] |
saveStateInSession(javax.faces.context.FacesContext context,
java.lang.Object treeStructure,
java.lang.Object state)
|
java.lang.Object |
saveView(javax.faces.context.FacesContext context)
|
void |
writeState(javax.faces.context.FacesContext context,
java.lang.Object state)
|
void |
writeState(javax.faces.context.FacesContext context,
javax.faces.application.StateManager.SerializedView state)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CAPTURED_VIEW_STATE
public static final java.lang.String CAPTURED_VIEW_STATE
- See Also:
- Constant Field Values
DEFAULT_NUMBER_OF_VIEWS
public static final int DEFAULT_NUMBER_OF_VIEWS
- See Also:
- Constant Field Values
AJAX_VIEW_SEQUENCE
public static final java.lang.String AJAX_VIEW_SEQUENCE
VIEW_SEQUENCE
public static final java.lang.String VIEW_SEQUENCE
VIEW_SEQUENCE_ATTRIBUTE
public static final java.lang.String VIEW_SEQUENCE_ATTRIBUTE
AjaxStateManager
public AjaxStateManager(javax.faces.application.StateManager parent)
- Parameters:
parent
-
getComponentStateToSave
protected java.lang.Object getComponentStateToSave(javax.faces.context.FacesContext context)
- Overrides:
getComponentStateToSave
in class javax.faces.application.StateManager
getTreeStructureToSave
protected java.lang.Object getTreeStructureToSave(javax.faces.context.FacesContext context)
- Overrides:
getTreeStructureToSave
in class javax.faces.application.StateManager
restoreComponentState
protected void restoreComponentState(javax.faces.context.FacesContext context,
javax.faces.component.UIViewRoot viewRoot,
java.lang.String renderKitId)
- Overrides:
restoreComponentState
in class javax.faces.application.StateManager
restoreTreeStructure
protected javax.faces.component.UIViewRoot restoreTreeStructure(javax.faces.context.FacesContext context,
java.lang.String viewId,
java.lang.String renderKitId)
- Overrides:
restoreTreeStructure
in class javax.faces.application.StateManager
writeState
public void writeState(javax.faces.context.FacesContext context,
java.lang.Object state)
throws java.io.IOException
- Overrides:
writeState
in class javax.faces.application.StateManager
- Throws:
java.io.IOException
writeState
public void writeState(javax.faces.context.FacesContext context,
javax.faces.application.StateManager.SerializedView state)
throws java.io.IOException
- Overrides:
writeState
in class javax.faces.application.StateManager
- Throws:
java.io.IOException
restoreView
public javax.faces.component.UIViewRoot restoreView(javax.faces.context.FacesContext context,
java.lang.String viewId,
java.lang.String renderKitId)
- Specified by:
restoreView
in class javax.faces.application.StateManager
saveSerializedView
public javax.faces.application.StateManager.SerializedView saveSerializedView(javax.faces.context.FacesContext context)
- Overrides:
saveSerializedView
in class javax.faces.application.StateManager
saveView
public java.lang.Object saveView(javax.faces.context.FacesContext context)
- Overrides:
saveView
in class javax.faces.application.StateManager
isSavingStateInClient
public boolean isSavingStateInClient(javax.faces.context.FacesContext context)
- Overrides:
isSavingStateInClient
in class javax.faces.application.StateManager
- Parameters:
context
-
- Returns:
- See Also:
StateManager.isSavingStateInClient(javax.faces.context.FacesContext)
restoreStateFromSession
protected java.lang.Object[] restoreStateFromSession(javax.faces.context.FacesContext context,
java.lang.String viewId,
java.lang.String renderKitId)
buildViewState
protected java.lang.Object[] buildViewState(javax.faces.context.FacesContext context)
- Parameters:
context
-
- Returns:
saveStateInSession
protected java.lang.Object[] saveStateInSession(javax.faces.context.FacesContext context,
java.lang.Object treeStructure,
java.lang.Object state)
- Parameters:
context
- treeStructure
- state
-
- Returns:
getStateHolder
protected org.ajax4jsf.application.StateHolder getStateHolder(javax.faces.context.FacesContext context)
- Parameters:
context
-
- Returns:
restoreLogicalViewId
protected java.lang.String restoreLogicalViewId(javax.faces.context.FacesContext context,
java.lang.String viewId,
java.lang.String renderKitId)
- Restore logical view id from request.
- Parameters:
context
- viewId
- renderKitId
-
- Returns:
getLogicalViewId
protected java.lang.String getLogicalViewId(javax.faces.context.FacesContext context)
- Return logical Id for current request view state. For a faces requests,
generate sequence numbers. For a ajax request, attempt to re-use id from
request submit.
- Parameters:
context
-
- Returns:
getRenderKit
protected javax.faces.render.RenderKit getRenderKit(javax.faces.context.FacesContext context)
getRenderKit
protected javax.faces.render.RenderKit getRenderKit(javax.faces.context.FacesContext context,
java.lang.String renderKitId)
Copyright © 2010. All Rights Reserved.