Package org.apache.myfaces.view.facelets
Class TemplateContext
java.lang.Object
org.apache.myfaces.view.facelets.TemplateContext
- Direct Known Subclasses:
- TemplateContextImpl
This class is used to encapsulate the information required to resolve
 facelets templates.
 
 Composite components require to "isolate" the inner template resolution.
 That means, when a ui:xx tag is used, do not take into account the outer
 templates defined.
 
 The methods here are only used by the current implementation and the intention
 is not expose it as public api.
- Since:
- 2.0.1
- Version:
- $Revision$ $Date$
- Author:
- Leonardo Uribe (latest modification by $Author$)
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionabstract voidaddKnownParameters(String knownParameters) abstract booleanabstract booleancontainsParameter(String key) abstract voidextendClient(AbstractFaceletContext actx, AbstractFacelet owner, TemplateClient client) abstract TemplateManagerReturn a set of the parameters known associated to this template context and/or template.abstract jakarta.el.ValueExpressiongetParameter(String key) Return the param value expression associated to the key passed, preserving the precedence of each template client.abstract booleanincludeDefinition(FaceletContext ctx, Facelet owner, UIComponent parent, String name) This method will walk through the TemplateClient stack to resolve and apply the definition for the passed name.abstract booleanabstract booleanabstract booleanCheck if no parameters are set.abstract TemplateManagerPop the last added pushed TemplateClientabstract TemplateManagerPop the last added extended TemplateClientabstract voidpushClient(AbstractFaceletContext actx, AbstractFacelet owner, TemplateClient client) Push the passed TemplateClient onto the stack for Definition Resolutionabstract voidsetAllowCacheELExpressions(boolean cacheELExpressions) abstract voidsetCompositeComponentClient(TemplateManager compositeComponentClient) Set the composite component TemplateManager instance, used to resolve cc:insertChildred or cc:insertFacet usages for the current template contextabstract voidsetParameter(String key, jakarta.el.ValueExpression value) Associate the param to the latest template client.
- 
Constructor Details- 
TemplateContextpublic TemplateContext()
 
- 
- 
Method Details- 
popClientPop the last added pushed TemplateClient- See Also:
 
- 
pushClientpublic abstract void pushClient(AbstractFaceletContext actx, AbstractFacelet owner, TemplateClient client) Push the passed TemplateClient onto the stack for Definition Resolution- Parameters:
- client-
- See Also:
 
- 
popExtendedClientPop the last added extended TemplateClient- Parameters:
- actx-
 
- 
extendClientpublic abstract void extendClient(AbstractFaceletContext actx, AbstractFacelet owner, TemplateClient client) 
- 
includeDefinitionpublic abstract boolean includeDefinition(FaceletContext ctx, Facelet owner, 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
 
- 
getCompositeComponentClient
- 
setCompositeComponentClientSet the composite component TemplateManager instance, used to resolve cc:insertChildred or cc:insertFacet usages for the current template context
- 
getParameterReturn the param value expression associated to the key passed, preserving the precedence of each template client.- Parameters:
- key-
- Returns:
- Since:
- 2.0.8
 
- 
setParameterAssociate the param to the latest template client.- Parameters:
- key-
- Since:
- 2.0.8
 
- 
isParameterEmptypublic abstract boolean isParameterEmpty()Check if no parameters are set.- Returns:
- Since:
- 2.0.8
 
- 
getParameterMap- Returns:
- Since:
- 2.0.8
 
- 
isAllowCacheELExpressionspublic abstract boolean isAllowCacheELExpressions()- Returns:
- Since:
- 2.0.8
 
- 
setAllowCacheELExpressionspublic abstract void setAllowCacheELExpressions(boolean cacheELExpressions) - Since:
- 2.0.8
 
- 
containsParameter- Parameters:
- key-
- Returns:
- Since:
- 2.1.12
 
- 
getKnownParametersReturn a set of the parameters known associated to this template context and/or template. This logic is used to detect which EL Expressions can be cached or not.- Returns:
- Since:
- 2.1.12
 
- 
containsKnownParameter- Parameters:
- key-
- Returns:
- Since:
- 2.1.12
 
- 
isKnownParametersEmptypublic abstract boolean isKnownParametersEmpty()- Returns:
- Since:
- 2.1.12
 
- 
addKnownParameters- Parameters:
- knownParameters-
- Since:
- 2.1.12
 
 
-