Package org.zkoss.zk.ui.metainfo
Class TemplateInfo
java.lang.Object
org.zkoss.zk.ui.metainfo.TemplateInfo
- All Implemented Interfaces:
Serializable,NodeInfo,Condition
Represent a template element.
- Since:
- 6.0.0
- Author:
- tomyeh
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionTemplateInfo(NodeInfo parent, String name, String src, Map<String, String> params, ConditionImpl cond) Creates a template. -
Method Summary
Modifier and TypeMethodDescriptionvoidappendChild(NodeInfo child) Append a childReturns a readonly list of children.Returns the effectiveness condition.Returns the evaluator.Returns the evaluator reference.getName()Returns the name of the template info.Returns the page definition, i.e., the root node, or null if not available.Returns a readonly map of the parameters that are assigned to the template.Returns the parent, or null if it has no parent.Returns the URI to create the template from, or null if not specified.booleanbooleanisEffective(Component comp) Used to evaluate whether it is effective.booleanisEffective(Page page) Used to evaluate whether it is effective.booleanremoveChild(NodeInfo child) Removes a child.resolveParameters(Component comp) Evaluates and returns a readonly map of parameters assigned to this template (never null).voidsetAnnotationNamespacedRoot(boolean annotationNamespacedRoot) Sets whether this TemplateInfo is the first TemplateInfo that has annotation namespace or binding annotation.voidsetCondition(ConditionImpl cond) Sets the effectiveness condition.toString()booleanTests if the condition is set
-
Constructor Details
-
Method Details
-
getName
Returns the name of the template info. -
getSrc
Returns the URI to create the template from, or null if not specified. -
getParameters
Returns a readonly map of the parameters that are assigned to the template.- Since:
- 10.0.0
-
resolveParameters
Evaluates and returns a readonly map of parameters assigned to this template (never null). -
toString
-
isAnnotationNamespacedRoot
public boolean isAnnotationNamespacedRoot()- Returns:
- whether this TemplateInfo is the first TemplateInfo that has annotation namespace or binding annotation.
- Since:
- 8.5.2
-
setAnnotationNamespacedRoot
public void setAnnotationNamespacedRoot(boolean annotationNamespacedRoot) Sets whether this TemplateInfo is the first TemplateInfo that has annotation namespace or binding annotation.- Parameters:
annotationNamespacedRoot-- Since:
- 8.5.2
-
getCondition
Returns the effectiveness condition. -
setCondition
Sets the effectiveness condition. -
withCondition
public boolean withCondition()Tests if the condition is set -
appendChild
Description copied from interface:NodeInfoAppend a child- Specified by:
appendChildin interfaceNodeInfo
-
removeChild
Description copied from interface:NodeInfoRemoves a child.- Specified by:
removeChildin interfaceNodeInfo
-
getChildren
Description copied from interface:NodeInfoReturns a readonly list of children.Note: the returned list is readonly. To modify, please use
NodeInfo.appendChild(org.zkoss.zk.ui.metainfo.NodeInfo)andNodeInfo.removeChild(org.zkoss.zk.ui.metainfo.NodeInfo)instead.- Specified by:
getChildrenin interfaceNodeInfo
-
isEffective
Description copied from interface:ConditionUsed to evaluate whether it is effective.- Specified by:
isEffectivein interfaceCondition- Parameters:
comp- used as the self variable. Ignored if null.
-
isEffective
Description copied from interface:ConditionUsed to evaluate whether it is effective.- Specified by:
isEffectivein interfaceCondition- Parameters:
page- used as the self variable. Ignored if null.
-
getEvaluatorRef
Description copied from interface:NodeInfoReturns the evaluator reference.- Specified by:
getEvaluatorRefin interfaceNodeInfo
-
getPageDefinition
Description copied from interface:NodeInfoReturns the page definition, i.e., the root node, or null if not available.- Specified by:
getPageDefinitionin interfaceNodeInfo
-
getEvaluator
Description copied from interface:NodeInfoReturns the evaluator.All nodes in the same ZUML tree has the same evaluator reference (inherited from the root node,
PageDefinition.getEvaluatorRef()).- Specified by:
getEvaluatorin interfaceNodeInfo
-
getParent
Description copied from interface:NodeInfoReturns the parent, or null if it has no parent.
-