I am having below code
<s:iterator value="assignedProductRoleBean.serviceProfiles" status="serStatus">
<tr>
<td width="150px">
<s:property value="serviceSpecCode" />
</td>
<s:hidden name="assignedProductRoleBean.serviceProfiles[{#serStatus.index}].serviceSpecCode" value="{serviceSpecCode}" />
<td width="150px">
<s:property value="code" />
</td>
<s:hidden name="assignedProductRoleBean.serviceProfiles[%{#serStatus.index}].code" value="%{code}" />
<td width="50px">
<s:checkbox name="assignedProductRoleBean.serviceProfiles[{#serStatus.index}].granted" value="granted" cssStyle="width:20px;border:0;background-color:transparent" />
</td>
<s:iterator value="assignedProductRoleBean.serviceProfiles[{#serStatus.index}].characteristics" status="serCharStatus">
test
<td width="150px">
<s:property value="key" />
</td>
<s:hidden name="assignedProductRoleBean.serviceProfiles[{#serStatus.index}].characteristics[%{#serCharStatus.index}].key" value="%{key}" />
<td width="150px">
<s:textfield theme="simple" name="assignedProductRoleBean.serviceProfiles[%{#serStatus.index}].characteristics[%{#serCharStatus.index}].value" value="%{value}" /></td>
</s:iterator>
</tr>
</s:iterator>
Problem is, I am getting CHECKED view for true values of ‘granted’. however When I uncheck/check in view page, they are not getting updated to respective bean.
One more issue with second iterator (inner). I am having characterstics, though they are not getting displayed in jsp page. however after submitting page, they are coming to action class.
ps i even tried value=%{granted}
I was stuck with the same issue. I’ve got this working:
The “selected” is actually isSelected boolean bean property. Threw me off for few hours.