struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davenew...@apache.org
Subject svn commit: r595336 - in /struts/struts2/trunk/core/src: main/java/org/apache/struts2/views/jsp/iterator/IteratorGeneratorTag.java test/java/org/apache/struts2/views/jsp/IteratorGeneratorTagTest.java
Date Thu, 15 Nov 2007 15:41:43 GMT
Author: davenewton
Date: Thu Nov 15 07:41:41 2007
New Revision: 595336

URL: http://svn.apache.org/viewvc?rev=595336&view=rev
Log:
https://issues.apache.org/struts/browse/WW-2322 Now putting generated collection into stack
context (not pageContext)

Modified:
    struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/iterator/IteratorGeneratorTag.java
    struts/struts2/trunk/core/src/test/java/org/apache/struts2/views/jsp/IteratorGeneratorTagTest.java

Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/iterator/IteratorGeneratorTag.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/iterator/IteratorGeneratorTag.java?rev=595336&r1=595335&r2=595336&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/iterator/IteratorGeneratorTag.java
(original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/iterator/IteratorGeneratorTag.java
Thu Nov 15 07:41:41 2007
@@ -234,14 +234,11 @@
 
         iteratorGenerator.execute();
 
-
-
-        // push resulting iterator into stack
+        // Push resulting iterator on stack and put into
+        // stack context if we have a "var" specified.
         getStack().push(iteratorGenerator);
         if (var != null && var.length() > 0) {
-            // if an id is specified, we have the resulting iterator set into
-            // the pageContext attribute as well
-            pageContext.setAttribute(var, iteratorGenerator);
+            getStack().getContext().put(var, iteratorGenerator);
         }
 
         return EVAL_BODY_INCLUDE;

Modified: struts/struts2/trunk/core/src/test/java/org/apache/struts2/views/jsp/IteratorGeneratorTagTest.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/test/java/org/apache/struts2/views/jsp/IteratorGeneratorTagTest.java?rev=595336&r1=595335&r2=595336&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/test/java/org/apache/struts2/views/jsp/IteratorGeneratorTagTest.java
(original)
+++ struts/struts2/trunk/core/src/test/java/org/apache/struts2/views/jsp/IteratorGeneratorTagTest.java
Thu Nov 15 07:41:41 2007
@@ -141,7 +141,7 @@
         tag.doStartTag();
         tag.doEndTag();
 
-        Object pageContextIterator = pageContext.getAttribute("myPageContextAttId");
+        Object pageContextIterator = stack.findValue("myPageContextAttId");
 
         assertTrue(pageContextIterator instanceof Iterator);
         // 1



Mime
View raw message