struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claire Wall" <claire.w...@kurtosys.com>
Subject Re: Getting the CheckBox Collection Value in FormBean Class
Date Mon, 02 Feb 2004 09:51:21 GMT
Do you mean that you want to store checkbox values in a form bean? if so...


You can set up an empty String array in your form bean like this:
String[] checkboxes = new String[]{};


and then in your jsp page you can set the property of a checkbox to this
array, like:

<html:checkbox name="FormName" property="checkboxes" value="???"/>


when the page is submitted, the checked box values are stored in the array -
you can then use them how you wish in your action. Note though that you have
to set the value of the checkbox if you are going to have anything submitted
to the array in the form.


HTH
claire :)


----- Original Message -----
From: "Ramachandran" <ramachandran@summitworks.com>
To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
Sent: Monday, February 02, 2004 9:38 AM
Subject: Getting the CheckBox Collection Value in FormBean Class


> Hi All,
>
>              If any body know how to get the solution for getting the
check
> box collection value in the form bean class. If so mail your ideas.......
>
> Thanx,
> Ram
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message