Here's an example.  You can replace <nested:iterate> with <logic:iterate> except that 
you'll have to specify the name attribute and the property must explicitly walk down 
(any) nested hierarchy.

Aside: If, like me, you are using Struts 1.0 you want to use the nested facility 
(hint:use it, it'll save you a ton of work) you can get it from 
www.keyboardmonkey.com.  It comes with a great tutorial as well

<tbody>
  <!-- Use the bean named 'prodListBean' -->
  <nested:root name="prodListBean">
    <!-- Get the collection 'products' -->
    <nested:iterate property="products" type="com.acme.Product">
      <tr>
        <td>
          <!-- Use the String[] 'selectedItems' in 'prodListBean' -->
          <nested:multibox property="../selectedItems">
            <!-- Display the 'productCode' (property of com.acme.Product) -->
            <nested:write property="productCode"/>
          </nested:multibox>
        </td>
        <!-- You can add 3 more similar cells -->
      </tr>
    </nested:iterate>
  </nested:root>
</tbody>

Sri

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
> Sent: Tuesday, September 03, 2002 3:09 PM
> To: [EMAIL PROTECTED]
> Subject: Question about multibox
> Importance: High
> 
> 
> Hi
> 
> I am newbie to struts and I have a question. I have a 
> situation where I have to display at set of checkboxes 
> (multibox) in a table over a number of rows (4 checkboxes in 
> a row). I am not able to figure out how to use logic:iterate 
> and html:mutlibox in conjunction and achieve this. If you 
> have a suggestion, please let me know. The number of 
> checkboxes to be displayed is dynamic.
> 
> regards
> vasu
> 
> Vasu Merugu
> La Post (HP, IT-16 Team)
> 15 Viale Stazione
> 6501 Bellinzona 
> Switzerland
> E-Mail : [EMAIL PROTECTED]
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:struts-user-> [EMAIL PROTECTED]>
> For 
> additional commands, 
> e-mail: <mailto:[EMAIL PROTECTED]>
> 
> 

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

Reply via email to