Is this setter being called at all?  If the 'permissions' property of your form-bean 
is some kind of List (as it seems looking at the setter you have shown) I don't think 
this setter will be invoked at all.  Struts will look for a 

  void setPermissions(List x)

method.  Likewise when you displayed the page Struts would have obtained the default 
selection(s) from calling a 

  List getPermissions()

method.

I haven't given you a definitive answer but hopefully this provided a clue.

Sri

> -----Original Message-----
> From: Jordan Thomas [mailto:[EMAIL PROTECTED]] 
> Sent: Thursday, January 23, 2003 6:51 AM
> To: Struts User List
> Subject: How to handle a multiple select tag
> 
> 
> Hi,
> 
> I have a form that has an <html:select> tag that looks like this:
> 
> <html:select property="permissions" multiple="true" size="10" 
> tabindex="5">
>     <html:options collection="allPermissions" property="permissionId"
>         labelProperty="permissionName"/>
> </html:select>
> 
> This renders out as intended but when I submit my form to an 
> ActionForm that has a method that looks like this:
> 
> 
> public void setPermissions( String[] permissions ) {
>         Integer permissionId = null;
>         for (int i = 0; i < permissions.length; i++){
>             permissionId = new Integer(permissions[i]);
>             this.permissions.add( new 
> PermissionData(permissionId, null) );
>         }
>     }
> 
> This essentially takes the permissions and adds them to a 
> Collection. For some reason though, the permissions String[] 
> is null. Why isn't this getting submitted?
> 
> thanks for your help
> 
> Jordan
> 
> 
> --
> 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