webwork/src/main/webwork/view/taglib/iterator IteratorGeneratorTag.java,1.3,1.4

[email protected] Mon, 10 Nov 2003 07:25:54 -0800
Newsgroups gmane.comp.java.open-symphony.cvs
Message-ID <[email protected]>
Update of /cvsroot/opensymphony/webwork/src/main/webwork/view/taglib/iterator
In directory sc8-pr-cvs1:/tmp/cvs-serv4820

Modified Files:
	IteratorGeneratorTag.java 
Log Message:
Make sure that the IteratorGenerator is executed before leaving
the doStartTag method. This fixes Jira issue WW-257

Index: IteratorGeneratorTag.java
===================================================================
RCS file: /cvsroot/opensymphony/webwork/src/main/webwork/view/taglib/iterator/IteratorGeneratorTag.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- IteratorGeneratorTag.java	30 Sep 2002 18:29:03 -0000	1.3
+++ IteratorGeneratorTag.java	10 Nov 2003 15:25:52 -0000	1.4
@@ -8,6 +8,7 @@
 
 import webwork.view.taglib.ActionTag;
 import webwork.util.IteratorGenerator;
+import webwork.util.ValueStack;
 
 import javax.servlet.jsp.JspException;
 import javax.servlet.jsp.tagext.Tag;
@@ -61,9 +62,13 @@
       if (separatorAttr != null)
          ((IteratorGenerator)bean).setSeparator(findString(separatorAttr));
 
+      // Execute the action now that it has got the appropriate values set
+      // Trigger the execute by getting the value from the holder object
+      if (holder instanceof ValueStack.ValueHolder)
+      	((ValueStack.ValueHolder) holder).getValue();
+      
       // Push holder back on stack
       getStack().pushValue(holder);
-
       return EVAL_BODY_INCLUDE;
    }
 }




-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/