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 classTemplateContextImpl.InitialPageContextstatic classTemplateContextImpl.InitialTemplateClientThis 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 voidaddKnownParameters(String key)booleancontainsKnownParameter(String key)booleancontainsParameter(String key)voidextendClient(AbstractFaceletContext actx, AbstractFacelet owner, TemplateClient client)TemplateManagergetCompositeComponentClient()Set<String>getKnownParameters()Return a set of the parameters known associated to this template context and/or template.javax.el.ValueExpressiongetParameter(String key)Return the param value expression associated to the key passed, preserving the precedence of each template client.Map<String,javax.el.ValueExpression>getParameterMap()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.booleanisAllowCacheELExpressions()booleanisKnownParametersEmpty()booleanisParameterEmpty()Check if no parameters are set.TemplateManagerpopClient(AbstractFaceletContext actx)Pop the last added pushed TemplateClientTemplateManagerpopExtendedClient(AbstractFaceletContext actx)Pop 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, javax.el.ValueExpression value)Associate the param to the latest template client.
-
-
-
Method Detail
-
popClient
public TemplateManager popClient(AbstractFaceletContext actx)
Description copied from class:TemplateContextPop the last added pushed TemplateClient- Specified by:
popClientin classTemplateContext- See Also:
TemplateClient
-
pushClient
public void pushClient(AbstractFaceletContext actx, AbstractFacelet owner, TemplateClient client)
Description copied from class:TemplateContextPush the passed TemplateClient onto the stack for Definition Resolution- Specified by:
pushClientin classTemplateContext- See Also:
TemplateClient
-
popExtendedClient
public TemplateManager popExtendedClient(AbstractFaceletContext actx)
Description copied from class:TemplateContextPop the last added extended TemplateClient- Specified by:
popExtendedClientin classTemplateContext
-
extendClient
public void extendClient(AbstractFaceletContext actx, AbstractFacelet owner, TemplateClient client)
- Specified by:
extendClientin classTemplateContext
-
includeDefinition
public boolean includeDefinition(FaceletContext ctx, Facelet owner, UIComponent parent, String name) throws IOException, FaceletException, FacesException, javax.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:
IOExceptionFaceletExceptionFacesExceptionjavax.el.ELException
-
getCompositeComponentClient
public TemplateManager getCompositeComponentClient()
- Specified by:
getCompositeComponentClientin classTemplateContext
-
setCompositeComponentClient
public void setCompositeComponentClient(TemplateManager compositeComponentClient)
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
public javax.el.ValueExpression getParameter(String key)
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
public boolean containsParameter(String key)
- Specified by:
containsParameterin classTemplateContext- Returns:
-
setParameter
public void setParameter(String key, javax.el.ValueExpression value)
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
public Map<String,javax.el.ValueExpression> getParameterMap()
- Specified by:
getParameterMapin classTemplateContext- Returns:
-
isKnownParametersEmpty
public boolean isKnownParametersEmpty()
- Specified by:
isKnownParametersEmptyin classTemplateContext- Returns:
-
getKnownParameters
public Set<String> 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
public boolean containsKnownParameter(String key)
- Specified by:
containsKnownParameterin classTemplateContext- Returns:
-
addKnownParameters
public void addKnownParameters(String key)
- Specified by:
addKnownParametersin classTemplateContext
-
isAllowCacheELExpressions
public boolean isAllowCacheELExpressions()
- Specified by:
isAllowCacheELExpressionsin classTemplateContext- Returns:
-
setAllowCacheELExpressions
public void setAllowCacheELExpressions(boolean cacheELExpressions)
- Specified by:
setAllowCacheELExpressionsin classTemplateContext
-
-