Update of /var/cvs/applications/taglib/src/org/mmbase/bridge/jsp/taglib/tree
In directory james.mmbase.org:/tmp/cvs-serv4922/tree

Modified Files:
      Tag: MMBase-1_8
        TreeContainerTag.java 
Log Message:
  MMB-1579


See also: 
http://cvs.mmbase.org/viewcvs/applications/taglib/src/org/mmbase/bridge/jsp/taglib/tree
See also: http://www.mmbase.org/jira/browse/MMB-1579


Index: TreeContainerTag.java
===================================================================
RCS file: 
/var/cvs/applications/taglib/src/org/mmbase/bridge/jsp/taglib/tree/TreeContainerTag.java,v
retrieving revision 1.9
retrieving revision 1.9.2.1
diff -u -b -r1.9 -r1.9.2.1
--- TreeContainerTag.java       25 Jul 2006 19:56:23 -0000      1.9
+++ TreeContainerTag.java       24 Jan 2008 12:09:50 -0000      1.9.2.1
@@ -24,7 +24,7 @@
  *
  * @author Michiel Meeuwissen
  * @since  MMBase-1.7.1
- * @version $Id: TreeContainerTag.java,v 1.9 2006/07/25 19:56:23 michiel Exp $
+ * @version $Id: TreeContainerTag.java,v 1.9.2.1 2008/01/24 12:09:50 michiel 
Exp $
  */
 public class TreeContainerTag extends RelatedNodesContainerTag implements 
NodeQueryContainer, ContainerReferrer { // extending from relatednodescontainer 
only for the attributes
 
@@ -63,7 +63,7 @@
      * Retrieves the starting query from environment.
      * Static because also used by TreeTag itself.
      */
-    static NodeQuery  getStartQuery(ContextReferrerTag thisTag, Attribute 
containerAttribute, Attribute nodeAttribute) throws JspTagException {
+    static NodeQuery  getStartQuery(NodeReferrerTag thisTag, Attribute 
containerAttribute, Attribute nodeAttribute) throws JspTagException {
         NodeQuery query = null;
         String container = containerAttribute.getString(thisTag);
         String node      = nodeAttribute.getString(thisTag);
@@ -82,11 +82,11 @@
         }
         if (query == null) { // try to work as node-referrer
             log.debug("working as node-referrer");
-            NodeProvider np =  (NodeProvider) 
thisTag.findParentTag(NodeProvider.class, "".equals(node) ? null : node, ! 
"".equals(node));
-            if (np == null) {
+            Node n = thisTag.getNode();
+            if (n == null) {
                 throw new TaglibException("No NodeQueryContainer nor a 
NodeProvider found in tree-tag");
             } else {
-                query = Queries.createNodeQuery(np.getNodeVar());
+                query = Queries.createNodeQuery(n);
             }
         }
         return query;
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to