Class TemplateContextImpl
java.lang.Object
org.apache.myfaces.view.facelets.TemplateContext
org.apache.myfaces.view.facelets.impl.TemplateContextImpl
- Since:
- 2.0.1
- Version:
- $Revision$ $Date$
- Author:
- Leonardo Uribe (latest modification by $Author$)
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classstatic final classThis is just a dummy template client that does nothing that is added by default for each template context -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddKnownParameters(String key) booleanbooleancontainsParameter(String key) voidextendClient(AbstractFaceletContext actx, AbstractFacelet owner, TemplateClient client) Return a set of the parameters known associated to this template context and/or template.jakarta.el.ValueExpressiongetParameter(String key) Return the param value expression associated to the key passed, preserving the precedence of each template client.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.booleanbooleanbooleanCheck if no parameters are set.Pop the last added pushed TemplateClientPop the last added extended TemplateClientvoidpushClient(AbstractFaceletContext actx, AbstractFacelet owner, TemplateClient client) Push the passed TemplateClient onto the stack for Definition ResolutionvoidsetAllowCacheELExpressions(boolean cacheELExpressions) voidsetCompositeComponentClient(TemplateManager compositeComponentClient) Set the composite component TemplateManager instance, used to resolve cc:insertChildred or cc:insertFacet usages for the current template contextvoidsetParameter(String key, jakarta.el.ValueExpression value) Associate the param to the latest template client.
-
Constructor Details
-
TemplateContextImpl
public TemplateContextImpl()
-
-
Method Details
-
popClient
Description copied from class:TemplateContextPop the last added pushed TemplateClient- Specified by:
popClientin classTemplateContext- See Also:
-
pushClient
Description copied from class:TemplateContextPush the passed TemplateClient onto the stack for Definition Resolution- Specified by:
pushClientin classTemplateContext- See Also:
-
popExtendedClient
Description copied from class:TemplateContextPop the last added extended TemplateClient- Specified by:
popExtendedClientin classTemplateContext
-
extendClient
- Specified by:
extendClientin classTemplateContext
-
includeDefinition
public boolean includeDefinition(FaceletContext ctx, Facelet owner, UIComponent parent, String name) throws IOException, FaceletException, FacesException, jakarta.el.ELException Description copied from class:TemplateContextThis 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.- Specified by:
includeDefinitionin classTemplateContextparent- the UIComponent to apply toname- name or null of the definition you want to apply- Returns:
- true if successfully applied, otherwise false
- Throws:
IOExceptionFaceletExceptionFacesExceptionjakarta.el.ELException
-
getCompositeComponentClient
- Specified by:
getCompositeComponentClientin classTemplateContext
-
setCompositeComponentClient
Description copied from class:TemplateContextSet the composite component TemplateManager instance, used to resolve cc:insertChildred or cc:insertFacet usages for the current template context- Specified by:
setCompositeComponentClientin classTemplateContext
-
getParameter
Description copied from class:TemplateContextReturn the param value expression associated to the key passed, preserving the precedence of each template client.- Specified by:
getParameterin classTemplateContext- Returns:
-
containsParameter
- Specified by:
containsParameterin classTemplateContext- Returns:
-
setParameter
Description copied from class:TemplateContextAssociate the param to the latest template client.- Specified by:
setParameterin classTemplateContext
-
isParameterEmpty
public boolean isParameterEmpty()Description copied from class:TemplateContextCheck if no parameters are set.- Specified by:
isParameterEmptyin classTemplateContext- Returns:
-
getParameterMap
- Specified by:
getParameterMapin classTemplateContext- Returns:
-
isKnownParametersEmpty
public boolean isKnownParametersEmpty()- Specified by:
isKnownParametersEmptyin classTemplateContext- Returns:
-
getKnownParameters
Description copied from class:TemplateContextReturn 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.- Specified by:
getKnownParametersin classTemplateContext- Returns:
-
containsKnownParameter
- Specified by:
containsKnownParameterin classTemplateContext- Returns:
-
addKnownParameters
- Specified by:
addKnownParametersin classTemplateContext
-
isAllowCacheELExpressions
public boolean isAllowCacheELExpressions()- Specified by:
isAllowCacheELExpressionsin classTemplateContext- Returns:
-
setAllowCacheELExpressions
public void setAllowCacheELExpressions(boolean cacheELExpressions) - Specified by:
setAllowCacheELExpressionsin classTemplateContext
-