1 10 package org.mmbase.bridge.jsp.taglib.tree; 11 12 import javax.servlet.jsp.JspTagException ; 13 14 import org.mmbase.bridge.*; 15 import org.mmbase.storage.search.*; 16 import org.mmbase.bridge.jsp.taglib.containers.*; 17 import org.mmbase.bridge.jsp.taglib.util.*; 18 import org.mmbase.bridge.jsp.taglib.*; 19 import org.mmbase.bridge.util.*; 20 21 29 public class BranchTag extends ContextReferrerTag implements QueryContainerReferrer { 30 31 private Attribute container = Attribute.NULL; 32 private Attribute nodeManager = Attribute.NULL; 33 private Attribute role = Attribute.NULL; 34 private Attribute searchDir = Attribute.NULL; 35 36 public void setContainer(String c) throws JspTagException { 37 container = getAttribute(c); 38 } 39 40 public void setType(String n) throws JspTagException { 41 nodeManager = getAttribute(n); 42 } 43 44 public void setRole(String r) throws JspTagException { 45 role = getAttribute(r); 46 } 47 public void setSearchdir(String sd) throws JspTagException { 48 searchDir = getAttribute(sd); 49 } 50 51 52 public int doStartTag() throws JspTagException { 53 GrowingTreeList tree = ((TreeContainerTag) findParentTag(TreeContainerTag.class, (String ) container.getValue(this), true)).getTree(); 54 NodeManager nm = tree.getCloud().getNodeManager(nodeManager == Attribute.NULL ? "object" : nodeManager.getString(this)); 55 tree.grow(nm, role.getString(this), searchDir.getString(this)); 56 return EVAL_BODY; 57 } 58 59 60 61 } 62 | Popular Tags |