For check boxes the value has to be boolean. So you need to use multibox as 
suggested below which works great.


>From: [EMAIL PROTECTED]
>Reply-To: [EMAIL PROTECTED]
>To: [EMAIL PROTECTED]
>Subject: Re: Struts handling of checkbox parameter values
>Date: Sat, 1 Sep 2001 12:16:41 -0700
>
>If you make your form bean property a String array, Struts will populate it
>from the request for you.
>
>You might also want to take a look at the <html:multibox> tag, which comes
>in handy for this type of thing.
>
>--
>Martin Cooper
>
>
>----- Original Message -----
>From: "Peter Pilgrim" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Sent: Friday, August 31, 2001 5:02 AM
>Subject: Struts handling of checkbox parameter values
>
>
> > How does do perform "String [] HttpServletRequest.getParameterValues()"
> > with a Struts Action and Action Form?
> >
> > If you a html form with a group of html checkbox elements like so
> >
> > <input type="checkbox" name="fruits" value="apple" > apple
> > <input type="checkbox" name="fruits" value="orange" > orange
> > <input type="checkbox" name="fruits" value="pear" > pear
> >
> > You would get an String array with raw Servlet request parameter.
> > Which looks like this "orange|apple| pear" assume all item were 
>selected.
> >
> > Tia
> > --
> > Peter Pilgrim          |  |        ++44 (0)207-545-9923
> >             .... \  \  ___   /  / ... .
> >             -   ----  ( * )  ---   --
> > _____________________________Cafe_Savannah,_San Antonio,Ibiza__
> >
> >
> >
> > --
> >
> > This e-mail may contain confidential and/or privileged information. If 
>you
>are not the intended recipient (or have received this e-mail in error)
>please notify the sender immediately and destroy this e-mail. Any
>unauthorized copying, disclosure or distribution of the material in this
>e-mail is strictly forbidden.
> >
> >
>
>


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

Reply via email to