Using Struts 1.2, how can I have the a changed checkbox value carryover from the JSP to the formbean? Note that the checkbox is within a collection being iterated over using struts.
<logic:iterate id="bean" name="PolicyServiceTaskAssignmentForm"
property="tasksList" indexId="indexId"
type="com.llic.web.bean.PolicyServiceTaskAssignmentBean">
<bean:define id="idx" name="indexId" />
<tr>
<td>
<%
String idCheckedForm = "item" + idx;
%>
<html:checkbox styleId="<%=idCheckedForm%>" property="checked" name="bean" indexed="true"
onchange="updateCheckbox(this.id)" />
</td>
<td>
<bean:write name="bean" property="jobName" />
</td>
<td>
<bean:write name="bean" property="experienceLevel" />
</td>
<td>
<bean:write name="bean" property="taskName" />
</td>
<td>
<bean:write name="bean" property="completionTime" />
</td>
</tr>
</logic:iterate>
Aucun commentaire:
Enregistrer un commentaire