Hi Michael,

You need:
<logic:iterate name="users" id="aUser">
<bean:write name="aUser" property="firstName"/>
<%-- etc --%>
</logic:iterate>

The name attr in logic:iterate must match the attribute name of the List.

Any BTW you're going to get really tired of writing Beans classes like 
User.  Many folks on this list are using the DynaBean framework.  Also 
let me plug my own project, dynclass.sourceforge.net, which will 
transform an arbitrary java Map into a JavaBean...

Michael Lee wrote:

>I read the docs and looked through the examples and didn't see anything that
>did what I was trying.
>I have an array of Value(view) objects that I want to iterate through in my
>jsp.
>
>Here it is;
>
>public class User
>{
>     private String firstName;
>     private String lastName;
>     public String getFirstName() { return firstName; }
>     public void setFirstName(String firstName) { this.firstName =
>firstName; }
>     public String getLastName() { return lastName; }
>     public void setLastName(String lastName) { this.lastName = lastName; }
>...
>}
>
>public SomeAction extendsAction
>{
>  perform(....
>  {
>    User[] users = new User[3];
>    users[0] = user1;
>    users[1] = user2;
>    ...
>    request.setAttribute("users", Arrays.asList(users));
>    return mapping.findForward("something.jsp");
>  }
>}
>
>in the something.jsp
><TABLE>
><logic:iterate id="userList" name="?">
><TR>
>  <TD>
>   ??? users.getFirstName(); ???
>  </TD>
>  <TD>
>    ??? users.getLastName(); ???
>  </TD>
>...
></TR>
></logic:iterate>
>
>HELP!
>thanks,
>Michael Lee
>
>
>--
>To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>
>  
>


-- 
Check it out: Map -> JavaBean
http://dynclass.sourceforge.net/




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

Reply via email to