Class TemplateContextImpl
- java.lang.Object
-
- org.apache.myfaces.view.facelets.TemplateContext
-
- org.apache.myfaces.view.facelets.impl.TemplateContextImpl
-
public class TemplateContextImpl extends TemplateContext
- Since:
- 2.0.1
- Version:
- $Revision$ $Date$
- Author:
- Leonardo Uribe (latest modification by $Author$)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TemplateContextImpl.InitialPageContext
static class
TemplateContextImpl.InitialTemplateClient
This is just a dummy template client that does nothing that is added by default for each template context
-
Constructor Summary
Constructors Constructor Description TemplateContextImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addKnownParameters(String key)
boolean
containsKnownParameter(String key)
boolean
containsParameter(String key)
void
extendClient(AbstractFaceletContext actx, AbstractFacelet owner, TemplateClient client)
TemplateManager
getCompositeComponentClient()
Set<String>
getKnownParameters()
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.Map<String,jakarta.el.ValueExpression>
getParameterMap()
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
isAllowCacheELExpressions()
boolean
isKnownParametersEmpty()
boolean
isParameterEmpty()
Check if no parameters are set.TemplateManager
popClient(AbstractFaceletContext actx)
Pop the last added pushed TemplateClientTemplateManager
popExtendedClient(AbstractFaceletContext actx)
Pop 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.
-
-
-
Method Detail
-
popClient
public TemplateManager popClient(AbstractFaceletContext actx)
Description copied from class:TemplateContext
Pop the last added pushed TemplateClient- Specified by:
popClient
in classTemplateContext
- See Also:
TemplateClient
-
pushClient
public void pushClient(AbstractFaceletContext actx, AbstractFacelet owner, TemplateClient client)
Description copied from class:TemplateContext
Push the passed TemplateClient onto the stack for Definition Resolution- Specified by:
pushClient
in classTemplateContext
- See Also:
TemplateClient
-
popExtendedClient
public TemplateManager popExtendedClient(AbstractFaceletContext actx)
Description copied from class:TemplateContext
Pop the last added extended TemplateClient- Specified by:
popExtendedClient
in classTemplateContext
-
extendClient
public void extendClient(AbstractFaceletContext actx, AbstractFacelet owner, TemplateClient client)
- 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
public TemplateManager getCompositeComponentClient()
- Specified by:
getCompositeComponentClient
in classTemplateContext
-
setCompositeComponentClient
public void setCompositeComponentClient(TemplateManager compositeComponentClient)
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
public jakarta.el.ValueExpression getParameter(String key)
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
public boolean containsParameter(String key)
- Specified by:
containsParameter
in classTemplateContext
- Returns:
-
setParameter
public void setParameter(String key, jakarta.el.ValueExpression value)
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
public Map<String,jakarta.el.ValueExpression> getParameterMap()
- Specified by:
getParameterMap
in classTemplateContext
- Returns:
-
isKnownParametersEmpty
public boolean isKnownParametersEmpty()
- Specified by:
isKnownParametersEmpty
in classTemplateContext
- Returns:
-
getKnownParameters
public Set<String> 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
public boolean containsKnownParameter(String key)
- Specified by:
containsKnownParameter
in classTemplateContext
- Returns:
-
addKnownParameters
public void addKnownParameters(String key)
- 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
-
-