Try something like this:

<logic:iterate ...name="images" id="img" type="your.package.Image" .. ..>

     <html:img name='<%= img.getName() %>'
          height='<%= img.getHeight() %>'
          width='<%= img.getWidth() %>' />

</logic:iterate>

That is, specify the type of entries you are iterating over, and use
scripting expressions to access the bean properties.

Hope this helps.

--
Martin Cooper


----- Original Message -----
From: "chiji nwankwo" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, October 02, 2001 1:10 PM
Subject: Itetaring over an array list of bean values


> Hi,
>
> I have a bean that encapsulates the properties needed to render an image
(border, height, width etc).
>
> I want to able to use the values stored in this bean as attribute values
for the struts img tag.
>
> Eg
>
> ArrayList images = new ArrayList();
>
> images.add( new Image( "pix", "22", "43" ) );
> images.add( new Image( "pix", "22", "43" ) );
> images.add( new Image( "pix", "22", "43" ) );
>
> .    .    .    .     .    .    .    .
>
> I then want to do the following
>
> <logic:iterate ...name="images" id="img". .. ..>
>
>      <html:img name=?? height=?? width=?? />
>
> </logic:iterate>
>
> I do have the array list stored in a scope that my jsp page can acess. I
don't know if this is possible.
>
> Thanks
>
> Chiji
>
>
>
>
>
>
> --------------------------------------------------------------------------
------
> Get your FREE download of MSN Explorer at http://explorer.msn.com
>
>


Reply via email to