public abstract class FaceletCompositionContext extends Object
Modifier and Type | Field and Description |
---|---|
protected static String |
FACELET_COMPOSITION_CONTEXT_KEY |
Modifier | Constructor and Description |
---|---|
protected |
FaceletCompositionContext() |
Modifier and Type | Method and Description |
---|---|
abstract void |
addAttachedObjectHandler(UIComponent compositeComponentParent,
AttachedObjectHandler handler)
Add to the composite component parent this handler, so it will be processed later when
ViewDeclarationLanguage.retargetAttachedObjects is called.
|
abstract void |
addMethodExpressionTargeted(UIComponent targetedComponent,
String attributeName,
Object backingValue)
Add a method expression as targeted for the provided composite component
|
void |
addUniqueId(String uniqueId)
Add an unique id to the list if recording is enabled,
if recording is not enabled it has no effect.
|
abstract void |
clearMethodExpressionAttribute(UIComponent compositeComponentParent,
String attributeName)
Clear the MethodExpression attribute to call vdl.retargetMethodExpression again
|
abstract boolean |
containsEnclosingValidatorId(String id) |
void |
endComponentUniqueIdSection()
Ends the current unique id section, so the previous counter will be used
to generate unique ids to components.
|
void |
endComponentUniqueIdSection(String base) |
void |
endMetadataSection()
Call this method to indicate f:metadata section has been already processed
since 2.1.7, 2.0.13
|
abstract void |
finalizeForDeletion(UIComponent component)
Used in conjunction with markForDeletion where any UIComponent marked will be removed.
|
void |
finalizeRelocatableResourcesForDeletion(UIViewRoot root)
Used to clean up all unused relocatable components on the root component.
|
String |
generateUniqueComponentId()
Generate a unique id for component instances.
|
String |
generateUniqueId()
Generate a unique id that will be used later to derive a unique id per tag
by FaceletContext.generateUniqueId().
|
void |
generateUniqueId(StringBuilder builderToAdd) |
abstract List<AttachedObjectHandler> |
getAttachedObjectHandlers(UIComponent compositeComponentParent)
Retrieve the list of object handlers attached to a composite component parent.
|
abstract UIComponent |
getCompositeComponentFromStack()
Return the composite component being applied on the current facelet.
|
int |
getCompositeComponentLevel()
Returns the current nesting level of composite components found.
|
static FaceletCompositionContext |
getCurrentInstance() |
static FaceletCompositionContext |
getCurrentInstance(FaceletContext ctx) |
static FaceletCompositionContext |
getCurrentInstance(FacesContext ctx) |
ELExpressionCacheMode |
getELExpressionCacheMode()
Indicates if a EL Expression can be or not cached by facelets vdl.
|
abstract Iterator<String> |
getEnclosingValidatorIds()
Deprecated.
|
abstract Iterator<Map.Entry<String,EditableValueHolderAttachedObjectHandler>> |
getEnclosingValidatorIdsAndHandlers()
Gets all validationIds with its associated EditableValueHolderAttachedObjectHandler from the stack.
|
abstract Iterator<String> |
getExcludedValidatorIds()
Deprecated.
|
abstract FaceletFactory |
getFaceletFactory() |
abstract String |
getFirstValidationGroupFromStack()
Deprecated.
|
StringBuilder |
getSharedStringBuilder() |
String |
getUniqueIdFromIterator()
Return the unique id from the iterator if applies
since 2.1.7, 2.0.13
|
List<String> |
getUniqueIdList()
Return the list of unique ids
since 2.1.7, 2.0.13
|
abstract UniqueIdVendor |
getUniqueIdVendorFromStack()
Return the latest UniqueIdVendor created from stack.
|
UIViewRoot |
getViewRoot(FacesContext facesContext) |
VisitContextFactory |
getVisitContextFactory() |
void |
incrementUniqueComponentId() |
void |
incrementUniqueId()
Increment the unique id without construct it.
|
void |
init(FacesContext facesContext) |
void |
initUniqueIdRecording()
Activater record unique id mode, so an structure will be
used to hold those values.
|
boolean |
isBuildingViewMetadata()
Check if the facelet is building view metadata
since 2.1.7, 2.0.13
|
boolean |
isDynamicComponentSection()
Indicate if the current facelet section is a dynamic component section,
which means it was added to the component tree using vdl.createComponent(...);
|
boolean |
isDynamicComponentTopLevel()
Check if the algorithm is applying a dynamic component and the current component
is the top level one.
|
boolean |
isDynamicCompositeComponentHandler() |
boolean |
isInMetadataSection()
Check if the component is created inside f:metadata section
since 2.1.7, 2.0.13
|
abstract boolean |
isMarkInitialState()
Check if this build should be marked as initial state.
|
abstract boolean |
isMarkInitialStateAndIsRefreshTransientBuildOnPSS() |
abstract boolean |
isMethodExpressionAttributeApplied(UIComponent compositeComponentParent,
String attributeName)
Check if the MethodExpression attribute has been applied using vdl.retargetMethodExpression
|
boolean |
isRefreshingSection()
Check if the section to be processed is being refreshed.
|
abstract boolean |
isRefreshingTransientBuild()
Check if this build is being refreshed, adding transient components
and adding/removing components under c:if or c:forEach or not.
|
abstract boolean |
isRefreshTransientBuildOnPSS()
Check if the current view will be refreshed with partial state saving.
|
boolean |
isRefreshTransientBuildOnPSSPreserveState() |
abstract boolean |
isUsingPSSOnThisView()
Check if we are using partial state saving on this view
|
boolean |
isWrapTagExceptionsAsContextAware() |
abstract void |
markForDeletion(UIComponent component)
Marks all direct children and Facets with an attribute for deletion.
|
abstract void |
markMethodExpressionAttribute(UIComponent compositeComponentParent,
String attributeName)
Mark the MethodExpression attribute as applied using vdl.retargetMethodExpression
|
void |
markRelocatableResourceForDeletion(UIComponent component)
Marks the given resource for deletion.
|
abstract void |
popCompositeComponentToStack() |
void |
popDynamicComponentSection() |
abstract void |
popEnclosingValidatorIdToStack()
Removes top of stack.
|
abstract void |
popExcludedValidatorIdToStack()
Deprecated.
|
abstract void |
popUniqueIdVendorToStack() |
abstract void |
popValidationGroupsToStack()
Deprecated.
|
abstract void |
pushCompositeComponentToStack(UIComponent parent) |
void |
pushDynamicComponentSection(String baseKey) |
abstract void |
pushEnclosingValidatorIdToStack(String validatorId)
Deprecated.
|
abstract void |
pushEnclosingValidatorIdToStack(String validatorId,
EditableValueHolderAttachedObjectHandler attachedObjectHandler)
Pushes validatorId to the stack of all enclosing validatorIds.
|
abstract void |
pushExcludedValidatorIdToStack(String validatorId)
Deprecated.
|
abstract void |
pushUniqueIdVendorToStack(UniqueIdVendor parent) |
abstract void |
pushValidationGroupsToStack(String validationGroups)
Deprecated.
|
void |
release(FacesContext facesContext)
Releases the MyFaceletContext object.
|
abstract void |
removeAttachedObjectHandlers(UIComponent compositeComponentParent)
Remove from the composite component parent the list of attached handlers.
|
void |
removeComponentForDeletion(UIComponent component) |
abstract Object |
removeMethodExpressionTargeted(UIComponent targetedComponent,
String attributeName)
Remove a method expression as targeted for the provided composite component
|
void |
setDynamicComponentTopLevel(boolean value) |
void |
setDynamicCompositeComponentHandler(boolean value) |
void |
setMarkInitialState(boolean value) |
void |
setUniqueIdsIterator(Iterator<String> uniqueIdsIterator)
Set the iterator used to retrieve unique ids.
|
void |
setViewRoot(UIViewRoot root) |
String |
startComponentUniqueIdSection()
Start a new unique id section, which means a new counter is used to
generate unique ids to components
|
String |
startComponentUniqueIdSection(String base)
Start a new unique id section, which means a new counter is used to
generate unique ids to components, but appending a base to the
new counter.
|
void |
startMetadataSection()
Call this method to indicate a f:metadata section is about to be processed
since 2.1.7, 2.0.13
|
protected static final String FACELET_COMPOSITION_CONTEXT_KEY
public static FaceletCompositionContext getCurrentInstance()
public static FaceletCompositionContext getCurrentInstance(FaceletContext ctx)
public static FaceletCompositionContext getCurrentInstance(FacesContext ctx)
public void init(FacesContext facesContext)
public void release(FacesContext facesContext)
public abstract FaceletFactory getFaceletFactory()
public abstract UIComponent getCompositeComponentFromStack()
public abstract void pushCompositeComponentToStack(UIComponent parent)
parent
- public abstract void popCompositeComponentToStack()
public abstract UniqueIdVendor getUniqueIdVendorFromStack()
public abstract void pushUniqueIdVendorToStack(UniqueIdVendor parent)
parent
- public abstract void popUniqueIdVendorToStack()
@Deprecated public abstract String getFirstValidationGroupFromStack()
@Deprecated public abstract void popValidationGroupsToStack()
@Deprecated public abstract void pushValidationGroupsToStack(String validationGroups)
validationGroups
- @Deprecated public abstract Iterator<String> getExcludedValidatorIds()
@Deprecated public abstract void popExcludedValidatorIdToStack()
@Deprecated public abstract void pushExcludedValidatorIdToStack(String validatorId)
validatorId
- @Deprecated public abstract Iterator<String> getEnclosingValidatorIds()
public abstract void popEnclosingValidatorIdToStack()
@Deprecated public abstract void pushEnclosingValidatorIdToStack(String validatorId)
validatorId
- public abstract void pushEnclosingValidatorIdToStack(String validatorId, EditableValueHolderAttachedObjectHandler attachedObjectHandler)
validatorId
- attachedObjectHandler
- public abstract Iterator<Map.Entry<String,EditableValueHolderAttachedObjectHandler>> getEnclosingValidatorIdsAndHandlers()
public abstract boolean containsEnclosingValidatorId(String id)
id
- public abstract boolean isRefreshingTransientBuild()
public abstract boolean isMarkInitialState()
public void setMarkInitialState(boolean value)
public abstract boolean isRefreshTransientBuildOnPSS()
public boolean isRefreshTransientBuildOnPSSPreserveState()
public abstract boolean isUsingPSSOnThisView()
public abstract boolean isMarkInitialStateAndIsRefreshTransientBuildOnPSS()
public abstract void addAttachedObjectHandler(UIComponent compositeComponentParent, AttachedObjectHandler handler)
compositeComponentParent
- handler
- public abstract void removeAttachedObjectHandlers(UIComponent compositeComponentParent)
compositeComponentParent
- public abstract List<AttachedObjectHandler> getAttachedObjectHandlers(UIComponent compositeComponentParent)
compositeComponentParent
- public abstract void markForDeletion(UIComponent component)
component
- UIComponent to markfinalizeForDeletion(UIComponent)
public abstract void finalizeForDeletion(UIComponent component)
component
- UIComponent to finalizepublic void removeComponentForDeletion(UIComponent component)
public void markRelocatableResourceForDeletion(UIComponent component)
markForDeletion(UIComponent)
.component
- UIComponent to finalizepublic void finalizeRelocatableResourcesForDeletion(UIViewRoot root)
root
- UIComponent to finalize (root component)public abstract void addMethodExpressionTargeted(UIComponent targetedComponent, String attributeName, Object backingValue)
targetedComponent
- attributeName
- backingValue
- A value that could be useful to revert its effects.public abstract boolean isMethodExpressionAttributeApplied(UIComponent compositeComponentParent, String attributeName)
compositeComponentParent
- attributeName
- public abstract void markMethodExpressionAttribute(UIComponent compositeComponentParent, String attributeName)
compositeComponentParent
- attributeName
- public abstract void clearMethodExpressionAttribute(UIComponent compositeComponentParent, String attributeName)
compositeComponentParent
- attributeName
- public abstract Object removeMethodExpressionTargeted(UIComponent targetedComponent, String attributeName)
targetedComponent
- attributeName
- public ELExpressionCacheMode getELExpressionCacheMode()
public boolean isWrapTagExceptionsAsContextAware()
public String startComponentUniqueIdSection()
public String startComponentUniqueIdSection(String base)
public void endComponentUniqueIdSection(String base)
base
- public String generateUniqueId()
public void generateUniqueId(StringBuilder builderToAdd)
public String generateUniqueComponentId()
public void endComponentUniqueIdSection()
public void setUniqueIdsIterator(Iterator<String> uniqueIdsIterator)
uniqueIdsIterator
- public void initUniqueIdRecording()
public void addUniqueId(String uniqueId)
uniqueId
- public String getUniqueIdFromIterator()
public List<String> getUniqueIdList()
public void incrementUniqueId()
public boolean isBuildingViewMetadata()
public void startMetadataSection()
public void endMetadataSection()
public boolean isInMetadataSection()
public boolean isRefreshingSection()
public void incrementUniqueComponentId()
public StringBuilder getSharedStringBuilder()
public int getCompositeComponentLevel()
public boolean isDynamicCompositeComponentHandler()
public void setDynamicCompositeComponentHandler(boolean value)
public void pushDynamicComponentSection(String baseKey)
public void popDynamicComponentSection()
public boolean isDynamicComponentTopLevel()
public void setDynamicComponentTopLevel(boolean value)
public boolean isDynamicComponentSection()
public UIViewRoot getViewRoot(FacesContext facesContext)
public void setViewRoot(UIViewRoot root)
public VisitContextFactory getVisitContextFactory()
Copyright © 2020 The Apache Software Foundation. All rights reserved.