Each element in the collection is exposed as a bean with name determined by
the "id" attribute of the iterate tag. So inside your tag you can access
that bean in a scriptlet or with the bean:write tag. The bean will be of
type Object unless you use the type attribute of the iterate tag.

> -----Original Message-----
> From: Charlesworth, Chico [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, May 30, 2001 12:09 PM
> To: '[EMAIL PROTECTED]'
> Subject: getting a specific ArrayList element
>
>
>
> To iterate through a java.util.ArrayList i use
> <logic:iterate> struts tag
> and that works fine ...
>
> but which tag do i need to use and what attribute settings do
> i need to
> access a specific ArrayList element?
> for example if i wanted to access the second element of my
> ArrayList using
> jsp, i would just do:
>
> <%MyObject o = (MyObject) myArrayList.get(1);%>
>
> Any ideas?
> chico
>
>
>
> --
> The content of this e-mail is confidential, may contain
> privileged material
> and is intended solely for the recipient(s) named above. If
> you receive this
> in error, please notify Software AG immediately and delete
> this e-mail.
>
> Software AG (UK) Limited
> Registered in England & Wales 1310740
> Registered Office: Hudson House, Hudson Way,
> Pride Park, Derby DE24 8HS
>

Reply via email to