Package org.apache.myfaces.view.facelets
Class AbstractFaceletContext
- java.lang.Object
- 
- jakarta.el.ELContext
- 
- jakarta.faces.view.facelets.FaceletContext
- 
- org.apache.myfaces.view.facelets.AbstractFaceletContext
 
 
 
- 
 public abstract class AbstractFaceletContext extends FaceletContext This class contains methods that belongs to original FaceletContext shipped in facelets code before 2.0, but does not take part from api, so are considered implementation details. This includes methods related to template handling feature of facelets (called by ui:composition, ui:define and ui:insert). The methods here are only used by the current implementation and the intention is not expose it as public api. Aditionally, it also contains methods used by the current implementation for implement new features, like composite components and UniqueIdVendor support.- Since:
- 2.0
- Version:
- $Revision$ $Date$
- Author:
- Leonardo Uribe (latest modification by $Author$)
 
- 
- 
Field Summary- 
Fields inherited from class jakarta.faces.view.facelets.FaceletContextFACELET_CONTEXT_KEY
 
- 
 - 
Constructor SummaryConstructors Constructor Description AbstractFaceletContext()
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidafterConstructELExpression()Cleanup all initialization done for construct an EL Expression.abstract voidapplyCompositeComponent(UIComponent parent, Resource resource)Apply the facelet referenced by a url containing a composite component definition to the current UIComponent.voidbeforeConstructELExpression()Indicates an expression will be resolved, so preparations should be done to detect if a contextual variable has been resolved.abstract voidextendClient(TemplateClient client)StringgenerateUniqueFaceletTagId(String count, String base)abstract Iterator<AjaxHandler>getAjaxHandlers()Return a descending iterator containing the ajax handlers to be applied to an specific component that implements ClientBehaviorHolder interface, according to the conditions specified on jsf 2.0 spec section 10.4.1.1.ELExpressionCacheModegetELExpressionCacheMode()Return the mode used to decide whether to cache or not EL expressionsabstract FaceletCompositionContextgetFaceletCompositionContext()Return the current FaceletCompositionContext instance from this build.PageContextgetPageContext()Return the current page contextTemplateContextgetTemplateContext()Return the current template contextabstract booleanincludeCompositeComponentDefinition(UIComponent parent, String name)This method resolve the current definition to be added by cc:insertChildren or cc:insertFacet.abstract booleanincludeDefinition(UIComponent parent, String name)This method will walk through the TemplateClient stack to resolve and apply the definition for the passed name.booleanisAllowCacheELExpressions()booleanisAnyFaceletsVariableResolved()Check if a variable has been resolved by this variable mapper or any parent "facelets contextual" variable mapper.abstract booleanisBuildingCompositeComponentMetadata()Check if this build is for build composite component metadataabstract voidpopAjaxHandlerToStack()abstract TemplateManagerpopClient(TemplateClient client)Pop the last added pushed TemplateClientabstract voidpopCompositeComponentClient()Pop the current composite component template client, removing the current template context from stack.abstract TemplateManagerpopExtendedClient(TemplateClient client)Pop the last added extended TemplateClientPageContextpopPageContext()Pop the passed page context instance onto the stack.abstract TemplateContextpopTemplateContext()Pop the passed template context instance from stack.abstract voidpushAjaxHandlerToStack(AjaxHandler parent)abstract voidpushClient(TemplateClient client)Push the passed TemplateClient onto the stack for Definition Resolutionabstract voidpushCompositeComponentClient(TemplateClient client)Push the composite component tag handler identified by client on template context stack, triggering the creation of a new empty TemplateContext, that will be used to resolve templates used on that component later.voidpushPageContext(PageContext client)Push the passed page context instance onto the stack.abstract voidpushTemplateContext(TemplateContext templateContext)Push the passed template context instance onto the stack, so all slots to be resolved (using includeDefinition() call) will take into account the information there.- 
Methods inherited from class jakarta.faces.view.facelets.FaceletContextgenerateUniqueId, getAttribute, getExpressionFactory, getFacesContext, includeFacelet, includeFacelet, setAttribute, setFunctionMapper, setVariableMapper
 - 
Methods inherited from class jakarta.el.ELContextaddEvaluationListener, convertToType, enterLambdaScope, exitLambdaScope, getContext, getELResolver, getEvaluationListeners, getFunctionMapper, getImportHandler, getLambdaArgument, getLocale, getVariableMapper, isLambdaArgument, isPropertyResolved, notifyAfterEvaluation, notifyBeforeEvaluation, notifyPropertyResolved, putContext, setLocale, setPropertyResolved, setPropertyResolved
 
- 
 
- 
- 
- 
Method Detail- 
getFaceletCompositionContextpublic abstract FaceletCompositionContext getFaceletCompositionContext() Return the current FaceletCompositionContext instance from this build.- Returns:
- the current FaceletCompositionContext instance
 
 - 
pushClientpublic abstract void pushClient(TemplateClient client) Push the passed TemplateClient onto the stack for Definition Resolution- Parameters:
- client-
- See Also:
- TemplateClient
 
 - 
popClientpublic abstract TemplateManager popClient(TemplateClient client) Pop the last added pushed TemplateClient- See Also:
- TemplateClient
 
 - 
popExtendedClientpublic abstract TemplateManager popExtendedClient(TemplateClient client) Pop the last added extended TemplateClient- Parameters:
- client-
 
 - 
extendClientpublic abstract void extendClient(TemplateClient client) 
 - 
includeDefinitionpublic abstract boolean includeDefinition(UIComponent parent, String name) throws IOException, FaceletException, FacesException, jakarta.el.ELException This method will walk through the TemplateClient stack to resolve and apply the definition for the passed name. If it's been resolved and applied, this method will return true.- Parameters:
- parent- the UIComponent to apply to
- name- name or null of the definition you want to apply
- Returns:
- true if successfully applied, otherwise false
- Throws:
- IOException
- FaceletException
- FacesException
- jakarta.el.ELException
 
 - 
applyCompositeComponentpublic abstract void applyCompositeComponent(UIComponent parent, Resource resource) throws IOException, FaceletException, FacesException, jakarta.el.ELException Apply the facelet referenced by a url containing a composite component definition to the current UIComponent. In other words, apply the section composite:implementation in the facelet to the current component. We need to do this here because DefaultFacelet is the one who has and handle the current FaceletFactory instance.- Parameters:
- parent-
- resource-
- Throws:
- IOException
- FaceletException
- FacesException
- jakarta.el.ELException
 
 - 
getAjaxHandlerspublic abstract Iterator<AjaxHandler> getAjaxHandlers() Return a descending iterator containing the ajax handlers to be applied to an specific component that implements ClientBehaviorHolder interface, according to the conditions specified on jsf 2.0 spec section 10.4.1.1.- Returns:
- Since:
- 2.0
 
 - 
popAjaxHandlerToStackpublic abstract void popAjaxHandlerToStack() - Since:
- 2.0
 
 - 
pushAjaxHandlerToStackpublic abstract void pushAjaxHandlerToStack(AjaxHandler parent) - Since:
- 2.0
 
 - 
isBuildingCompositeComponentMetadatapublic abstract boolean isBuildingCompositeComponentMetadata() Check if this build is for build composite component metadata- Returns:
- Since:
- 2.0
 
 - 
popCompositeComponentClientpublic abstract void popCompositeComponentClient() Pop the current composite component template client, removing the current template context from stack.- Since:
- 2.0.1
 
 - 
pushCompositeComponentClientpublic abstract void pushCompositeComponentClient(TemplateClient client) Push the composite component tag handler identified by client on template context stack, triggering the creation of a new empty TemplateContext, that will be used to resolve templates used on that component later.- Parameters:
- client-
- Since:
- 2.0.1
 
 - 
pushTemplateContextpublic abstract void pushTemplateContext(TemplateContext templateContext) Push the passed template context instance onto the stack, so all slots to be resolved (using includeDefinition() call) will take into account the information there.- Parameters:
- templateContext-
- Since:
- 2.0.1
 
 - 
popTemplateContextpublic abstract TemplateContext popTemplateContext() Pop the passed template context instance from stack. This method is used by CompositeComponentResourceTagHandler to resolve templates according to the composite component level it is necessary.- Since:
- 2.0.1
 
 - 
includeCompositeComponentDefinitionpublic abstract boolean includeCompositeComponentDefinition(UIComponent parent, String name) throws IOException, FaceletException, FacesException, jakarta.el.ELException This method resolve the current definition to be added by cc:insertChildren or cc:insertFacet.- Parameters:
- parent-
- name-
- Returns:
- Throws:
- IOException
- FaceletException
- FacesException
- jakarta.el.ELException
- Since:
- 2.0.1
 
 - 
getTemplateContextpublic TemplateContext getTemplateContext() Return the current template context- Returns:
- Since:
- 2.0.8
 
 - 
pushPageContextpublic void pushPageContext(PageContext client) Push the passed page context instance onto the stack.- Parameters:
- client-
- Since:
- 2.0.8
 
 - 
popPageContextpublic PageContext popPageContext() Pop the passed page context instance onto the stack.- Since:
- 2.0.8
 
 - 
getPageContextpublic PageContext getPageContext() Return the current page context- Returns:
- Since:
- 2.0.8
 
 - 
isAnyFaceletsVariableResolvedpublic boolean isAnyFaceletsVariableResolved() Check if a variable has been resolved by this variable mapper or any parent "facelets contextual" variable mapper.- Returns:
- Since:
- 2.0.8
 
 - 
isAllowCacheELExpressionspublic boolean isAllowCacheELExpressions() 
 - 
beforeConstructELExpressionpublic void beforeConstructELExpression() Indicates an expression will be resolved, so preparations should be done to detect if a contextual variable has been resolved.- Since:
- 2.0.8
 
 - 
afterConstructELExpressionpublic void afterConstructELExpression() Cleanup all initialization done for construct an EL Expression.- Since:
- 2.0.8
 
 - 
getELExpressionCacheModepublic ELExpressionCacheMode getELExpressionCacheMode() Return the mode used to decide whether to cache or not EL expressions- Since:
- 2.0.8
 
 
- 
 
-