You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Shashi <sh...@mphasis.com> on 2001/12/13 15:47:39 UTC

how to deal with Variable form elements in struts

Hi,

I have a form that looks very similar to the "inbox" in Yahoo or HotMail.

The number of checkbox is varying and so are their names. How to assign their values to the Form Bean property?

Currently I've been using a normal "input" html form tag like follows.

<input type="checkbox" name="chk_<%= I %>">

and in the Action Class I'm using the request object to go through all the form elements using getParameterNames and finding out the checkboxes and getting the "checked" row.

Can some one through light on how to go about doing the same using the Struts frame work.

--Shashi.