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

Modified Files:
      Tag: MMBase-1_8
        NodeListHelper.java AbstractNodeListTag.java 
Log Message:
  MMB-1478 (ported from HEAD)


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


Index: NodeListHelper.java
===================================================================
RCS file: 
/var/cvs/applications/taglib/src/org/mmbase/bridge/jsp/taglib/NodeListHelper.java,v
retrieving revision 1.28
retrieving revision 1.28.2.1
diff -u -b -r1.28 -r1.28.2.1
--- NodeListHelper.java 3 Aug 2006 17:14:59 -0000       1.28
+++ NodeListHelper.java 28 Feb 2008 12:16:40 -0000      1.28.2.1
@@ -28,7 +28,7 @@
 /**
  *
  * @author Michiel Meeuwissen
- * @version $Id: NodeListHelper.java,v 1.28 2006/08/03 17:14:59 michiel Exp $
+ * @version $Id: NodeListHelper.java,v 1.28.2.1 2008/02/28 12:16:40 michiel 
Exp $
  * @since MMBase-1.7
  */
 
@@ -69,6 +69,8 @@
     protected Attribute add = Attribute.NULL;
     protected Attribute retain = Attribute.NULL;
     protected Attribute remove= Attribute.NULL;
+    protected Attribute varStatus = Attribute.NULL;
+    protected String varStatusName = null;
 
 
     /**
@@ -165,6 +167,12 @@
         remove = thisTag.getAttribute(a);
     }
 
+    /**
+     * @since MMBase-1.8.6
+     */
+    public void setVarStatus(String s) throws JspTagException {
+        varStatus = thisTag.getAttribute(s);
+    }
 
 
     public String getComparator() throws JspTagException {
@@ -271,6 +279,7 @@
     public void doStartTagHelper() throws JspTagException {
         // make a (temporary) container
         collector = new ContextCollector(thisTag.getContextProvider());
+        varStatusName = (String) varStatus.getValue(thisTag);
 
         // serve parent timer tag:
         TagSupport t = thisTag.findParentTag(TimerTag.class, null, false);
@@ -295,6 +304,9 @@
         if (getId() != null) {
             
thisTag.getContextProvider().getContextContainer().unRegister(getId());
         }
+        if (varStatusName != null) {
+            
thisTag.getContextProvider().getContextContainer().unRegister(varStatusName);
+        }
 
         if (collector != null) { // might occur for some legacy extensions
             log.debug("copying to collector");
@@ -408,6 +420,10 @@
             }
             nodeHelper.setNodeVar(next);
             nodeHelper.fillVars();
+            if (varStatusName != null) {
+                org.mmbase.bridge.jsp.taglib.util.ContextContainer cc = 
thisTag.getContextProvider().getContextContainer();
+                cc.register(varStatusName, getLoopStatus());
+            }
         } catch (BridgeException be) { // e.g. NodeManager does not exist
             log.warn(be.getMessage(), be);
         }


Index: AbstractNodeListTag.java
===================================================================
RCS file: 
/var/cvs/applications/taglib/src/org/mmbase/bridge/jsp/taglib/AbstractNodeListTag.java,v
retrieving revision 1.75
retrieving revision 1.75.2.1
diff -u -b -r1.75 -r1.75.2.1
--- AbstractNodeListTag.java    3 Aug 2006 17:14:59 -0000       1.75
+++ AbstractNodeListTag.java    28 Feb 2008 12:16:40 -0000      1.75.2.1
@@ -30,7 +30,7 @@
  * @author Kees Jongenburger
  * @author Michiel Meeuwissen
  * @author Pierre van Rooden
- * @version $Id: AbstractNodeListTag.java,v 1.75 2006/08/03 17:14:59 michiel 
Exp $
+ * @version $Id: AbstractNodeListTag.java,v 1.75.2.1 2008/02/28 12:16:40 
michiel Exp $
  */
 
 abstract public class AbstractNodeListTag extends AbstractNodeProviderTag 
implements BodyTag, ListProvider {
@@ -132,6 +132,10 @@
     public void setRemove(String c) throws JspTagException {
         listHelper.setRemove(c);
     }
+    public void setVarStatus(String s) throws JspTagException {
+        listHelper.setVarStatus(s);
+    }
+
 
 
     /**
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to