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 class
static final class
This 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 TypeMethodDescriptionvoid
addKnownParameters
(String key) boolean
boolean
containsParameter
(String key) void
extendClient
(AbstractFaceletContext actx, AbstractFacelet owner, TemplateClient client) Return a set of the parameters known associated to this template context and/or template.jakarta.el.ValueExpression
getParameter
(String key) Return the param value expression associated to the key passed, preserving the precedence of each template client.boolean
includeDefinition
(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.boolean
boolean
boolean
Check if no parameters are set.Pop the last added pushed TemplateClientPop the last added extended TemplateClientvoid
pushClient
(AbstractFaceletContext actx, AbstractFacelet owner, TemplateClient client) Push the passed TemplateClient onto the stack for Definition Resolutionvoid
setAllowCacheELExpressions
(boolean cacheELExpressions) void
setCompositeComponentClient
(TemplateManager compositeComponentClient) Set the composite component TemplateManager instance, used to resolve cc:insertChildred or cc:insertFacet usages for the current template contextvoid
setParameter
(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:TemplateContext
Pop the last added pushed TemplateClient- Specified by:
popClient
in classTemplateContext
- See Also:
-
pushClient
Description copied from class:TemplateContext
Push the passed TemplateClient onto the stack for Definition Resolution- Specified by:
pushClient
in classTemplateContext
- See Also:
-
popExtendedClient
Description copied from class:TemplateContext
Pop the last added extended TemplateClient- Specified by:
popExtendedClient
in classTemplateContext
-
extendClient
- Specified by:
extendClient
in classTemplateContext
-
includeDefinition
public boolean includeDefinition(FaceletContext ctx, Facelet owner, UIComponent parent, String name) throws IOException, FaceletException, FacesException, jakarta.el.ELException Description copied from class:TemplateContext
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.- Specified by:
includeDefinition
in classTemplateContext
parent
- the UIComponent to apply toname
- 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
- Specified by:
getCompositeComponentClient
in classTemplateContext
-
setCompositeComponentClient
Description copied from class:TemplateContext
Set the composite component TemplateManager instance, used to resolve cc:insertChildred or cc:insertFacet usages for the current template context- Specified by:
setCompositeComponentClient
in classTemplateContext
-
getParameter
Description copied from class:TemplateContext
Return the param value expression associated to the key passed, preserving the precedence of each template client.- Specified by:
getParameter
in classTemplateContext
- Returns:
-
containsParameter
- Specified by:
containsParameter
in classTemplateContext
- Returns:
-
setParameter
Description copied from class:TemplateContext
Associate the param to the latest template client.- Specified by:
setParameter
in classTemplateContext
-
isParameterEmpty
public boolean isParameterEmpty()Description copied from class:TemplateContext
Check if no parameters are set.- Specified by:
isParameterEmpty
in classTemplateContext
- Returns:
-
getParameterMap
- Specified by:
getParameterMap
in classTemplateContext
- Returns:
-
isKnownParametersEmpty
public boolean isKnownParametersEmpty()- Specified by:
isKnownParametersEmpty
in classTemplateContext
- Returns:
-
getKnownParameters
Description copied from class:TemplateContext
Return 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:
getKnownParameters
in classTemplateContext
- Returns:
-
containsKnownParameter
- Specified by:
containsKnownParameter
in classTemplateContext
- Returns:
-
addKnownParameters
- Specified by:
addKnownParameters
in classTemplateContext
-
isAllowCacheELExpressions
public boolean isAllowCacheELExpressions()- Specified by:
isAllowCacheELExpressions
in classTemplateContext
- Returns:
-
setAllowCacheELExpressions
public void setAllowCacheELExpressions(boolean cacheELExpressions) - Specified by:
setAllowCacheELExpressions
in classTemplateContext
-