1 10 package org.mmbase.bridge.jsp.taglib.macro; 11 12 import javax.servlet.jsp.JspTagException ; 13 14 import org.mmbase.bridge.*; 15 16 import org.mmbase.bridge.jsp.taglib.ListTag; 17 import org.mmbase.bridge.jsp.taglib.util.Attribute; 18 import org.mmbase.bridge.jsp.taglib.containers.*; 19 20 22 23 31 public class RelatedTag extends ListTag { 32 34 protected Node getBaseNode() throws JspTagException { 35 if (nodes != Attribute.NULL && ! nodes.getString(this).equals("")) { 36 String [] ns = nodes.getString(this).trim().split("\\s*,\\s*"); 38 return super.getCloudVar().getNode(ns[0]); 39 } else { 40 return getNode(); 41 } 42 } 43 44 45 public Cloud getCloudVar() throws JspTagException { 47 return getBaseNode().getCloud(); 48 49 } 50 51 protected String getSearchNodes() throws JspTagException { 52 return (nodes == Attribute.NULL || nodes.getString(this).equals("")) ? "" + getNode().getNumber() : nodes.getString(this); 53 } 54 55 59 protected String getPath() throws JspTagException { 60 return getBaseNode().getNodeManager().getName() + "0," + path.getString(this); 61 } 62 63 protected QueryContainer getListContainer() throws JspTagException { 64 return (QueryContainer) findParentTag(RelatedContainerTag.class, (String ) container.getValue(this), false); 65 } 66 67 } 68 | Popular Tags |