[JIRA-OS] Commented: (WW-257) IteratorGenerator tag broken in 1.3.1 -- works with 1.2 (patch included)
| Newsgroups | gmane.comp.java.open-symphony.cvs |
|---|---|
| Message-ID | <[email protected]> |
The following comment has been added to this issue:
Author: Dick Zetterberg
Created: Sat, 6 Sep 2003 4:08 PM
Body:
With the suggested patch, won't the IteratorGenerator execute method be executed twice? Once when you invoke it (the patch) and once when the end tag is reached and the gd.finish method is called.
To execute it only once I think it would be possible to replace the suggested execute call with a holder.getValue() call instead. That will make the holder object execute the action, and it will then remember this so it is not done again in gd.finish.
I do not use the generator tag myself, but I cannot really understand why it should extend the ActionTag in the first place. One could just add the handling of parameters and the id attribute to it, and that would be what it needs, yes?
---------------------------------------------------------------------
View the issue:
http://jira.opensymphony.com/secure/ViewIssue.jspa?key=WW-257
Here is an overview of the issue:
---------------------------------------------------------------------
Key: WW-257
Summary: IteratorGenerator tag broken in 1.3.1 -- works with 1.2 (patch included)
Type: Bug
Status: Assigned
Priority: Major
Project: WebWork
Fix Fors:
1.3.1
Versions:
1.3.1
Assignee: Patrick Lightbody
Reporter: Robert Dawson
Created: Wed, 20 Aug 2003 5:20 AM
Updated: Wed, 20 Aug 2003 9:51 PM
Description:
The IteratorGeneratorTag works by setting some values on the IteratorGenerator Action and then the execute method generates the appropriate list.
In version 1.2.1 of WebWork this worked as the execute method was called lazily. In 1.3 the ActionTag calls the execute earlier in the tag lifecycle which works great in most cases, but breaks the IteratorGeneratorTag.
A fix for this is to call the execute method on IteratorGenerator explicitly from the IteratorGeneratorTag.
I will attach the patch for this.
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://jira.opensymphony.com/secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf