tags:

views:

13

answers:

1

Hi all If i wanted to store the struts2 tag checkboxlist elements in the database ,How do i save it in the database .I mean how do i work with the checkboxlist tag ,

like how do i declare it in the table .How do i use it ?

Thanks

A: 

Here are several different examples showing how to use the checkboxlist in your Action class and view.

Once the checkbox is submitted to your action, you'll have a List populated with the checked String values. You can then save those Strings in your database in an appropriate field type (i.e. for MySQL that could be CHAR or VARCHAR).

Pat