DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24612>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24612

The "collection" attribute of the <logic:iterator> tag does not lookup the object in 
the specified scope

           Summary: The "collection" attribute of the <logic:iterator> tag
                    does not lookup the object in the specified scope
           Product: Struts
           Version: 1.1 Final
          Platform: All
        OS/Version: Linux
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Custom Tags
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]
                CC: [EMAIL PROTECTED]


The doStartTag() method in IterateTag.java class assigns the string value of 
the "collection" attribute of the tag to the "collection" global variable of 
the class. Therefore, the logic:iterate tag used with the "collection" 
attribute will always be initialized with the name of the Collection to 
iterate and not the Collection itself (so it will be a String), and the method 
will always throw the "Cannot iterate over this collection" exception.

to reproduce, jsp code:

----- cut here ------
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<% 
java.util.Vector v = new java.util.Vector();
v.add("Foo");
v.add("Bar");
pageContext.setAttribute ("MyCollection", v.elements());
%>
<logic:iterate collection="MyCollection" id="collectionItem">
<%=collectionItem%>
</logic:iterate>
----------- cut here -----------

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to