struts-user mailing list archives

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

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"
type="com.web.users.UsersVO">
     <bean:write name="users" scope="page" property="userFirstName"/>
</logic:iterate>

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?

Regards,
Mykola


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message