Yes, you can do that. In your form bean, use a String[] (i.e. string array)
for the property type, and Struts will take care of setting all the values
when the form is submitted.

--
Martin Cooper


----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, August 15, 2001 11:22 PM
Subject: Multiple input fields


> Is it possible to have multiple input fields with the same name?
>
> Eg. In regular HTML I would do this
>
> <form action="blah">
>
> <TABLE>
>     <TR>
>       <TD>Category</TD>
>       <TD>Description</TD>
>     </TR>
>
>     <TR>
>       <TD><input type="text" name="category" value=""></TD>
>       <TD><input type="text" name="description" value=""></TD>
>     </TR>
>
>     <TR>
>       <TD><input type="text" name="category" value=""></TD>
>       <TD><input type="text" name="description" value=""></TD>
>     </TR>
>
> ...
>
> </TABLE>
>
>
> </form>
>
> Then when access all the parameters by calling
request.getParameterValues("category")
> Can ActionForm Beans handle multiple values with the same field name?  If
so how is this achieved?
>
> Thanks,
> Andrew.
>
>
> __________________________________________________________________
> Your favorite stores, helpful shopping tools and great gift ideas.
Experience the convenience of buying online with Shop@Netscape!
http://shopnow.netscape.com/
>
> Get your own FREE, personal Netscape Mail account today at
http://webmail.netscape.com/
>
>


Reply via email to