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

Modified Files:
        TreeFileTag.java 
Log Message:
better compatibility with 1.8


See also: 
http://cvs.mmbase.org/viewcvs/applications/taglib/src/org/mmbase/bridge/jsp/taglib/pageflow


Index: TreeFileTag.java
===================================================================
RCS file: 
/var/cvs/applications/taglib/src/org/mmbase/bridge/jsp/taglib/pageflow/TreeFileTag.java,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -b -r1.29 -r1.30
--- TreeFileTag.java    3 Feb 2008 17:33:56 -0000       1.29
+++ TreeFileTag.java    20 Jun 2008 15:59:59 -0000      1.30
@@ -12,6 +12,7 @@
 import org.mmbase.bridge.jsp.taglib.TaglibException;
 import org.mmbase.bridge.jsp.taglib.util.Attribute;
 import javax.servlet.jsp.JspTagException;
+import javax.servlet.jsp.JspException;
 
 import org.mmbase.util.logging.Logger;
 import org.mmbase.util.logging.Logging;
@@ -24,14 +25,14 @@
  * A full description of this command can be found in the mmbase-taglib.xml 
file.
  *
  * @author Johannes Verelst
- * @version $Id: TreeFileTag.java,v 1.29 2008/02/03 17:33:56 nklasens Exp $
+ * @version $Id: TreeFileTag.java,v 1.30 2008/06/20 15:59:59 michiel Exp $
  */
 
 public class TreeFileTag extends UrlTag {
 
     private static final Logger log = 
Logging.getLoggerInstance(TreeFileTag.class);
     protected Attribute objectList = Attribute.NULL;
-    protected TreeHelper th = new TreeHelper();
+    protected final TreeHelper th = new TreeHelper();
 
     protected Attribute notFound        = Attribute.NULL;
 
@@ -42,6 +43,7 @@
         notFound = getAttribute(n);
     }
 
+    @Override
     protected String getPage(String p) throws JspTagException {
         try {
             return th.findTreeFile(p, objectList.getValue(this).toString(),
@@ -51,6 +53,7 @@
         }
     }
 
+    @Override
     protected void initTag(boolean internal) throws JspTagException {
         th.setCloud(getCloudVar());
         th.setBackwardsCompatible(! 
"false".equals(pageContext.getServletContext().getInitParameter("mmbase.taglib.smartpath_backwards_compatible")));
@@ -61,17 +64,31 @@
         }
     }
     
+    @Override
+    public int doStartTag() throws JspTagException {
+        super.doStartTag();
+        helper.setValue(url);
+        return EVAL_BODY; // lets try _not_ buffering the body.
+        // this may give unexpected results if ${_} is not used (or another 
tag calling 'haveBody')
+    }
 
+    @Override
     public void doFinally() {
         th.doFinally();
         super.doFinally();
     }
 
 
+    @Override
     // override to cancel
     protected boolean doMakeRelative() {
         log.debug("doMakeRelative() overridden!");
         return false;
     }
 
+
+    public int doAfterBody() throws JspException {
+        return helper.doAfterBody();
+    }
+
 }
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to