1

I am setting status property as true in the background but still check box not checked:

JSP:

<c:forEach var="list" items="${someFormList}" varStatus="status">
  <tr>
    <td>
      <form:checkbox path="status" items="${list.status}" />
    </td>
  </tr>
</c:forEach>

Controller:

model.addObject("someFormList", someFormList);

1 Answer 1

0

Path gets you partway there. Add the value property to the form:checkbox tag:

<form:checkbox path="status" value="${status}" />

Instead of addObject, you may want to try addAttribute (see also this solution).

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.