and how do u set the values for <html:multibox>? 

i had managed to create a list of  checkboxes but the "checked" status
isn't initialized at all, meaning, whatever checkboxes that were
selected by users were not reflected in the checkboxes when the user
returns to the same page again after successfully updating the database.

    <html:multibox name="userForm" property="accessList">
           <bean:write name="aManagerName" property="adminCode"/>,

    </html:multibox>

in UserForm, the getter & setter methods of accessList are as such:
        public String[] getMgrAdminAccess() {
                return this.mgrAdminAccess;
        }

        public void setMgrAdminAccess(String[] inMgrAdminAccess) {
                        this.mgrAdminAccess = inMgrAdminAccess;
        }

+trish

-----Original Message-----
From: Tom Klaasen (TeleRelay) [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 10, 2002 6:00 PM
To: Struts Users Mailing List
Subject: RE: Multibox in iterate


You should add the "name='role'" attribute in the <html:multibox> tag.
When you think about it, it is logical.

hth,
tomK

> -----Original Message-----
> From: Viljoen, Danie [mailto:[EMAIL PROTECTED]] 
> Sent: woensdag 9 januari 2002 13:54
> To: 'Struts Users Mailing List'
> Subject: Multibox in iterate
> 
> 
> Hi
> 
> I iterate through a collection without any problem, but now I 
> want to add a
> checkbox for each row.  I used the following in my jsp page:
> 
> <logic:iterate id="role" name="myBean" property="allRoles" >
>     <tr>
>         <td>
>             <html:multibox property="testChecked"> 
>                 <bean:write name="role" property="name"/> 
>             </html:multibox> 
>         </td>
>         <td>
>         <bean:write name="role" property="name"/>
>         </td><td>
>         <bean:write name="role" />
>         </td>
>     </tr>
> </logic:iterate>
> 
> If I remove the multibox tag I iterate successfully, but with 
> the iterate
> tag I'm getting:
> 
> javax.servlet.ServletException: No getter method available 
> for property
> testChecked for bean under name org.apache.struts.taglib.html.BEAN
> 
> Thank You
> Danie
> 
> --
> 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]>


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

Reply via email to