public class SessionChangeManager extends ChangeManager
ChangeManager.ChangeOutcome, ChangeManager.NotificationOutcome
Constructor and Description |
---|
SessionChangeManager() |
Modifier and Type | Method and Description |
---|---|
void |
addComponentChange(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent uiComponent,
ComponentChange change)
Adds a ComponentChange to the current request for a specified component.
|
protected void |
addComponentChangeImpl(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent targetComponent,
ComponentChange componentChange)
Adds a ComponentChange and registers against the supplied component.
|
void |
addDocumentChange(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent uiComponent,
DocumentChange change)
Add a DocumentChange to this current request for a specified component.
|
ChangeManager.ChangeOutcome |
addDocumentChangeWithOutcome(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent uiComponent,
DocumentChange change)
Add a DocumentChange for a specified component, and return the outcome of adding the change.
|
void |
applyComponentChangesForCurrentView(javax.faces.context.FacesContext context)
Applies all the ComponentChanges added so far for the current view.
|
void |
applyComponentChangesForSubtree(javax.faces.context.FacesContext context,
javax.faces.component.NamingContainer root)
Applies the ComponentChanges added so far for components underneath
the specified NamingContainer.
|
void |
applySimpleComponentChanges(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component)
Apply non-cross-component changes to a component in its original location.
|
ChangeManager.NotificationOutcome |
documentChangeApplied(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent component,
ComponentChange componentChange)
In this implementation, if a simple attribute document change was applied, we will remove
previously added component change on the same component and attribute, if any.
|
protected Document |
getDocument(javax.faces.context.FacesContext context)
We don't support DocumentChange persistence
|
protected void |
persistDocumentChanges(javax.faces.context.FacesContext facesContext) |
AttributeComponentChange |
replaceAttributeChangeIfPresent(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
AttributeComponentChange attributeComponentChange)
Replace an AttributeComponentChange if it's present.
|
protected boolean |
supportsDocumentPersistence(javax.faces.context.FacesContext context)
Returns true if we can support Document-based Persistence
in this ChangeManager.
|
createDocumentChange, registerDocumentFactory
public void applyComponentChangesForCurrentView(javax.faces.context.FacesContext context)
applyComponentChangesForCurrentView
in class ChangeManager
context
- The FacesContext instance for the current request.public void applyComponentChangesForSubtree(javax.faces.context.FacesContext context, javax.faces.component.NamingContainer root)
applyComponentChangesForSubtree
in class ChangeManager
context
- The FacesContext instance for the current request.root
- The NamingContainer that contains the component subtree
to which ComponentChanges should be applied. If null, all changes are
applied.public void applySimpleComponentChanges(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)
applySimpleComponentChanges
in class ChangeManager
component
- Component to apply the simple changes topublic void addDocumentChange(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent uiComponent, DocumentChange change)
ChangeManager
addDocumentChange
in class ChangeManager
public ChangeManager.ChangeOutcome addDocumentChangeWithOutcome(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent uiComponent, DocumentChange change)
ChangeManager
addDocumentChangeWithOutcome
in class ChangeManager
facesContext
- The FacesContext instance for the current requestuiComponent
- The UIComponent instance for which the DocumentChange is to be addedchange
- The DocumentChange to be addedChangeManager.ChangeOutcome
public ChangeManager.NotificationOutcome documentChangeApplied(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent component, ComponentChange componentChange)
documentChangeApplied
in class ChangeManager
component
- The target UIComponent instance for which the DocumentChange was
appliedcomponentChange
- The ComponentChange for which an equivalent DocumentChange was appliedprotected void addComponentChangeImpl(javax.faces.context.FacesContext context, javax.faces.component.UIComponent targetComponent, ComponentChange componentChange)
context
- The FacesContext instance for the current request.targetComponent
- The target component against which this change needs
to be registered and applied later on.componentChange
- The ComponentChange to add.public AttributeComponentChange replaceAttributeChangeIfPresent(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, AttributeComponentChange attributeComponentChange)
ChangeManager
replaceAttributeChangeIfPresent
in class ChangeManager
protected Document getDocument(javax.faces.context.FacesContext context)
public void addComponentChange(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent uiComponent, ComponentChange change)
addComponentChange
in class ChangeManager
DocumentChangeFactory
,
#documentChangeApplied(FacesContext, UIComponent, ComponentChange
protected void persistDocumentChanges(javax.faces.context.FacesContext facesContext)
protected boolean supportsDocumentPersistence(javax.faces.context.FacesContext context)
getDocument
in order to enable Document-based Persistence.context
- Copyright © 2001-2017 The Apache Software Foundation. All Rights Reserved.