struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From germu...@apache.org
Subject svn commit: r495722 - /struts/sandbox/trunk/tiles/tiles-core/src/main/java/org/apache/tiles/taglib/PutListTag.java
Date Fri, 12 Jan 2007 20:24:12 GMT
Author: germuska
Date: Fri Jan 12 12:24:11 2007
New Revision: 495722

URL: http://svn.apache.org/viewvc?view=rev&rev=495722
Log:
Initialize list in doStartTag; release() is not necessarily called before every use of a tag.


Modified:
    struts/sandbox/trunk/tiles/tiles-core/src/main/java/org/apache/tiles/taglib/PutListTag.java

Modified: struts/sandbox/trunk/tiles/tiles-core/src/main/java/org/apache/tiles/taglib/PutListTag.java
URL: http://svn.apache.org/viewvc/struts/sandbox/trunk/tiles/tiles-core/src/main/java/org/apache/tiles/taglib/PutListTag.java?view=diff&rev=495722&r1=495721&r2=495722
==============================================================================
--- struts/sandbox/trunk/tiles/tiles-core/src/main/java/org/apache/tiles/taglib/PutListTag.java
(original)
+++ struts/sandbox/trunk/tiles/tiles-core/src/main/java/org/apache/tiles/taglib/PutListTag.java
Fri Jan 12 12:24:11 2007
@@ -41,7 +41,6 @@
 
 
     public PutListTag() {
-        super.setValue(new ArrayList<ComponentAttribute>());
     }
 
     /**
@@ -55,6 +54,10 @@
         throw new IllegalStateException("The value of the PutListTag must be the originally
defined list.");
     }
 
+    public int doStartTag() {
+        super.setValue(new ArrayList<ComponentAttribute>());
+    	return super.doStartTag();
+    }
     /**
      * PutListTag may not have any body, except for PutAttribute tags.
      *
@@ -69,8 +72,8 @@
      * clearing the contents of the list.
      */
     public void release() {
+        super.setValue(null);
         super.release();
-        getValue().clear();
     }
 
     /**



Mime
View raw message