You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Hudson (JIRA)" <ji...@apache.org> on 2016/07/15 14:12:23 UTC

[jira] [Commented] (WW-4312) A problem on Iterator tag

    [ https://issues.apache.org/jira/browse/WW-4312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15379440#comment-15379440 ] 

Hudson commented on WW-4312:
----------------------------

SUCCESS: Integrated in Struts-JDK7-master #495 (See [https://builds.apache.org/job/Struts-JDK7-master/495/])
Fix for WW-4312 (lukaszlenart: rev fd33dc84a674edbeecfc5638995da9a13816dafc)
* core/src/main/java/org/apache/struts2/components/IteratorComponent.java
added testcase for WW-4312 / #69 (lukaszlenart: rev 6fd37d86cceeae43a3481ed70ba2f500778249a4)
* core/src/test/java/org/apache/struts2/components/IteratorComponentTest.java


> A problem on Iterator tag
> -------------------------
>
>                 Key: WW-4312
>                 URL: https://issues.apache.org/jira/browse/WW-4312
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Other
>    Affects Versions: 2.3.15
>            Reporter: K OSSUser
>            Priority: Minor
>             Fix For: 2.5
>
>
> I can't explain well so see below.
> Expected "1, 2, , 3," but the result was "1, 2, 2, 3,".
> Test.jsp
> {code:xml}
> <s:iterator value="%{{{1, 2},{null, 3}}}" var="var1">
> <s:iterator value="#var1" var="var2">
> <s:property value="#var2" />,
> </s:iterator>
> </s:iterator>
> {code}
> I changed below class then it was fixed.
> org.apache.struts2.components.IteratorComponent#start
> {code:java}
> //  if ((var != null) && (currentValue != null)) { <= Old.
>     if (var != null) { // <= New.
>         //pageContext.setAttribute(id, currentValue);
>         //pageContext.setAttribute(id, currentValue, PageContext.REQUEST_SCOPE);
>         putInContext(currentValue);
>     }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)