You're closing your first element, so the iterate never gets to the 
bean:write until after the loop is finished.

You have:
<logic:iterate id="storerooms" name="storeroomList" scope="application"
property="storeroomList"/>

It should be (note the lack of the trailing slash):
<logic:iterate id="storerooms" name="storeroomList" scope="application"
property="storeroomList">

If you only want to do something for one specific bean, then use logic:equal 
inside the iterate tag.
--
Dan Miser
http://www.distribucon.com

>From: "Alex Colic" <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: "Struts" <[EMAIL PROTECTED]>
>Subject: Need help with logic:iterate :)
>Date: Thu, 19 Apr 2001 15:50:44 -0400
>
>I
>have attempted the below but the only storeroom name to be printed out to
>the screen is the last storeroom. I traced the execution of the iterate
>class and it looks to be getting the correct data, going through each
>element of the vector and pulling out the name property and then looping
>through all the elements without printing them to the screen and then the
>bean:write is called.
>
>Oh, bonus question.. Lets say I only wanted to print out a particular
>storeroom. Iterate through the vector but only print the storeroom that had
>the name "main."
>
>
><logic:iterate id="storerooms" name="storeroomList" scope="application"
>property="storeroomList"/>
>       <bean:write name="storerooms" property="name" /><BR>
></logic:iterate>

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

Reply via email to