com.sun.faces.application.view
public class FaceletPartialStateManagementStrategy extends javax.faces.view.StateManagementStrategy
Modifier and Type | Field and Description |
---|---|
private static java.util.logging.Logger |
LOGGER
Stores the logger.
|
private static java.lang.String |
SKIP_ITERATION_HINT
Stores the skip hint.
|
Constructor and Description |
---|
FaceletPartialStateManagementStrategy()
Constructor.
|
FaceletPartialStateManagementStrategy(javax.faces.context.FacesContext context)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
private int |
getProperChildIndex(javax.faces.component.UIComponent component)
Helper method that determines what the index of the given child component
will be taking transient siblings into account.
|
private boolean |
hasTransientAncestor(javax.faces.component.UIComponent component)
Does the give component have a transient ancestor.
|
private javax.faces.component.UIComponent |
locateComponentByClientId(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent subTree,
java.lang.String clientId)
Find the given component in the component tree.
|
private void |
pruneAndReAddToDynamicActions(java.util.List<ComponentStruct> dynamicActionList,
ComponentStruct struct)
Methods that takes care of pruning and re-adding an action to the dynamic
action list.
|
private void |
restoreDynamicActions(javax.faces.context.FacesContext context,
StateContext stateContext,
java.util.Map<java.lang.String,java.lang.Object> stateMap)
Restore the list of dynamic actions and replay them.
|
private void |
restoreDynamicAdd(javax.faces.context.FacesContext context,
java.util.Map<java.lang.String,java.lang.Object> state,
ComponentStruct struct)
Method that takes care of restoring a dynamic add.
|
private void |
restoreDynamicRemove(javax.faces.context.FacesContext context,
ComponentStruct struct)
Method that takes care of restoring a dynamic remove.
|
javax.faces.component.UIViewRoot |
restoreView(javax.faces.context.FacesContext context,
java.lang.String viewId,
java.lang.String renderKitId)
Restore the view.
|
private void |
saveDynamicActions(javax.faces.context.FacesContext context,
StateContext stateContext,
java.util.Map<java.lang.String,java.lang.Object> stateMap)
Save the dynamic actions.
|
java.lang.Object |
saveView(javax.faces.context.FacesContext context)
Save the view.
|
private static final java.util.logging.Logger LOGGER
private static java.lang.String SKIP_ITERATION_HINT
public FaceletPartialStateManagementStrategy()
public FaceletPartialStateManagementStrategy(javax.faces.context.FacesContext context)
context
- the Faces context.private javax.faces.component.UIComponent locateComponentByClientId(javax.faces.context.FacesContext context, javax.faces.component.UIComponent subTree, java.lang.String clientId)
context
- the Faces context.clientId
- the client id of the component to find.private void pruneAndReAddToDynamicActions(java.util.List<ComponentStruct> dynamicActionList, ComponentStruct struct)
If you remove a component, re-add it to the same parent and then remove it again, you only have to capture the FIRST remove. Similarly if you add a component, remove it, and then re-add it to the same parent you only need to capture the LAST add.
dynamicActionList
- the dynamic action list.struct
- the component struct to add.private void restoreDynamicActions(javax.faces.context.FacesContext context, StateContext stateContext, java.util.Map<java.lang.String,java.lang.Object> stateMap)
context
- the Faces context.stateContext
- the state context.stateMap
- the state.viewRoot
- the view root.private void restoreDynamicAdd(javax.faces.context.FacesContext context, java.util.Map<java.lang.String,java.lang.Object> state, ComponentStruct struct)
context
- the Faces context.state
- the state.struct
- the component struct.private void restoreDynamicRemove(javax.faces.context.FacesContext context, ComponentStruct struct)
context
- the Faces context.struct
- the component struct.public javax.faces.component.UIViewRoot restoreView(javax.faces.context.FacesContext context, java.lang.String viewId, java.lang.String renderKitId)
restoreView
in class javax.faces.view.StateManagementStrategy
context
- the Faces context.viewId
- the view id.renderKitId
- the render kit id.private void saveDynamicActions(javax.faces.context.FacesContext context, StateContext stateContext, java.util.Map<java.lang.String,java.lang.Object> stateMap)
context
- the Faces context.stateContext
- the state context.stateMap
- the state.public java.lang.Object saveView(javax.faces.context.FacesContext context)
saveView
in class javax.faces.view.StateManagementStrategy
context
- the Faces context.private int getProperChildIndex(javax.faces.component.UIComponent component)
component
- the UI component.private boolean hasTransientAncestor(javax.faces.component.UIComponent component)
component
- the UI component.Copyright © 2002-2010 Oracle America, Inc. All Rights Reserved.