struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mykola Ostapchuk" <>
Subject Iterate over an Iterator question
Date Tue, 01 Jul 2003 14:52:03 GMT

I'm having a problem to iterate with <logic:iterate ..> tag.
I have an Iterator object "allUsers". Here's my code:

<logic:iterate id="users" name="allUsers" scope="request"
     <bean:write name="users" scope="page" property="userFirstName"/>

In Action class:

Iterator allUsers = userBD.selectAllUsers();
request.setAttribute("allUsers", allUsers);

When I use Vector object in this case - everything works fine. With Iterator
object it returns nothing (no error, just nothing).

According to <logic:iterate ...> tag spec:
"Repeats the nested body content of this tag once for every element of the
specified collection, which must be an Iterator, a Collection, a Map (whose
values are to be iterated over), or an array."

Any suggestions - what I'm doing wrong?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message