List of checkboxes and Array/ArrayList data binding not working.
Joined: May 02, 2008
I have a form in which I show list of empId, first name and last name in table form. I want to show checkbox in front of every row and I have Delete button, which when clicked should delete all the employees which are checked.
I tried a lot to bind list of checkboxes to array or ArrayList of empIds. But it does not properly bind it.
When I submit the form, in my form handler I get zero sized empIds list, even though I have checked few checkboxes.
I have tried <form:checkbox /> tag. It bindes, but the chckboxes which are not selected also get submitted with null values. In my code I ignore null, but the problem with tag is I could not find how to show unchecked checkboxes in my first display.
Joined: Jul 05, 2005
You should do something like the following:
SCJA 1.0, SCJP 1.4, SCWCD 1.4, SCBCD 1.3, SCJP 5.0, SCEA 5, SCBCD 5; OCUP - Fundamental, Intermediate and Advanced; IBM Certified Solution Designer - OOAD, vUML 2; SpringSource Certified Spring Professional