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);
Parker
  • 7,244
  • 12
  • 70
  • 92

1 Answers1

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).

Parker
  • 7,244
  • 12
  • 70
  • 92