Thanks Laurie,

It worked perfectly.

Neil Meyer

-----Original Message-----
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Laurie Harper
Sent: 07 December 2005 12:30 AM
To: user@struts.apache.org
Subject: Re: checkbox for nested collection

Neil Meyer wrote:
> Good day,
> 
> I read all the topics on checkboxes in this list but couldn't find a
solution
> for my problem. I hope there is somebody that can shed some light on this
to
> me.
> 
> I have a dynamic list of menu items that is retrieved from a database into
an
> array property.
> 
> I have to array properties one with all menu items available and one with
the
> user items allocated.
> 
> When I render my JSP I need the array list of all items to display. See
> example below:
> 
> <logic:iterate id="profileListItem" indexId="index" name="profileListDTO">
> 
>       <bean:write name="profileListItem" property="title"/>
> 
>       <html:multibox property="menuItemsSelected">
>               <bean:write name="profileListItem" property="menuItemsId"/>
>       </html:multibox>
> </logic:iterate>
> 
> What I need now is to pre check the relevant menu items from the array
> specific to the user.
> 
> Any help will be appreciated.

You need to set the values in the menuItemsSelected form bean property 
to reflect the array specific to the user. I'm not too sure from your 
description what that means in practice, but the result you're looking 
for is for the menuItemsSelected property to contain only those values 
which should be checked.

L.


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


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

Reply via email to