I have a command object FaxForm
and it holds a list of FaxStatus
objects inside a faxStatusList
property.
public class F
Spring form tags has a checkboxes tag. You can use it as follows to do the binding automatically:
<form:checkboxes items="${faxStatusList}" path="faxStatusList" itemLabel="name" itemValue="id" delimiter="<br/>" onclick="yourOnClickMethodIfYouNeed(this);"/>
The above snippet will display a list of checkbox items delimited with the br tag. Any changes made to the state of the checkboxes will be reflected appropriately in your FaxForm. faxStatusList object.