/*package*/ LeafInfo(NodeInfo parent) { if (parent != null) parent.appendChild(this); }
/*package*/ static final void fixEvaluatorRefDown(NodeInfo child, EvaluatorRef evalr) { if (child instanceof LeafInfo) ((LeafInfo) child)._evalr = evalr; final List<NodeInfo> children = child.getChildren(); if (children != null) //it is null if this method is called in constructor for (NodeInfo c : children) fixEvaluatorRefDown(c, evalr); }
/** Constructs a {@link ZScriptInfo} with an URL, which might contain an EL * expression. * * @param url the URL. It may contain XEL expressions. * @param locator the locator used to locate the zscript file */ public ZScriptInfo(NodeInfo parent, String zslang, String url, Locator locator, ConditionImpl cond) { super(parent, cond); _zs = new ZScript(parent.getEvaluatorRef(), zslang, url, locator); }
public void appendChild(NodeInfo child) { NodeInfo oldp = child.getParent(); if (oldp != null) oldp.removeChild(child); _children.add(child); ((LeafInfo) child).setParentDirectly(this); //except root, all are LeafInfo fixEvaluatorRefDown(child, _evalr); }
final List<Component> created = new LinkedList<Component>(); final Page page = ci.page; final PageDefinition pagedef = parentInfo.getPageDefinition(); if (!parentInfo.getChildren().isEmpty()) { final ReplaceableText replaceableText = new ReplaceableText(); for (final NodeInfo meta : parentInfo.getChildren()) { if (meta instanceof ComponentInfo) { final ComponentInfo childInfo = (ComponentInfo) meta;
String textAs = null; StringBuilder textAsBuffer = null; for (NodeInfo p = parent; p != null; p = p.getParent()) if (p instanceof ComponentInfo) { pi = (ComponentInfo) p; List<NodeInfo> children = parent.getChildren(); final String labelAttr = parentlang.getLabelAttribute(); for (Property prop : ((ComponentInfo) children.get(children.size() - 1)).getProperties()) {
private static final LanguageDefinition getLanguageDefinition(NodeInfo node) { for (; node != null; node = node.getParent()) { if (node instanceof ComponentInfo) { LanguageDefinition langdef = ((ComponentInfo) node).getLanguageDefinition(); if (langdef != null) return langdef; } else if (node instanceof PageDefinition) { return ((PageDefinition) node).getLanguageDefinition(); } else if (node instanceof ShadowInfo) { return ((ShadowInfo) node).getLanguageDefinition(); } } return null; }
zslang = parent.getPageDefinition().getZScriptLanguage();
public void appendChild(NodeInfo child) { NodeInfo oldp = child.getParent(); if (oldp != null) oldp.removeChild(child); _children.add(child); ((LeafInfo) child).setParentDirectly(this); //except root, all are LeafInfo BranchInfo.fixEvaluatorRefDown(child, getEvaluatorRef()); //Use getEvaluatorRef() to force _evalr being assigned }
/*package*/ ConditionLeafInfo(NodeInfo parent, ConditionImpl cond) { parent.appendChild(this); _cond = cond; }