How can I read the value of dynamic checkboxes from a form?
The following code from my jsp-file writes out the checkboxes dynamically:
<logic:iterate id="roleSelection" name="roles">
<html:checkbox name="roleSelection" property="userRoleId"/>
<bean:write name="roleSelection" property="userRoleName"/><br>
</logic:iterate>
This is working just fine, but the problem is how to check which of the
boxes have been selected and how to set a checkbox to CHECKED in my
java-code.
What do I put in the following functions in my Form-class:
public void setRoleSelected(int index)
{
???
}
public int getIsRoleSelected(int index)
{
???
}