title: Unable to bind spring form checkbox
body: <p>I am trying to display full name, along with checkboxes for supervisor and manager. These two checkboxes are checked if the person has values for these to be true.</p>
  
  <p>What i am trying to do is display users with full name and supervior and manager columns having checkboxes and these are checked or unchecked, and when the form is submitted the changes are binded as well. I tried model attribute but don't have any luck.</p>
  
  <p>Here's what i have so far.</p>
  
  <p><strong>Controller</strong></p>
  
  <pre><code>@Controller
  @RequestMapping("/person.html")
  public class PersonsController {
  
      @Autowired
      private PersonService personService;
  
      @RequestMapping(method = RequestMethod.GET)
      public String initForm(@ModelAttribute("personView")PersonView personView, BindingResult result, Model model) {
  
  
          List&lt;Person&gt;  persons= personService.getPersonList();
  
          PersonView personData = new PersonView();
          personView.setPersonList(persons);
  
  
          model.addAttribute("personView", personData);   
  
          return "member";
      }
  
      @RequestMapping(method = RequestMethod.POST)
      public String submitForm(Model model, PersonView personView, BindingResult result) {
          System.out.println("Controller runs");
          model.addAttribute("persons", personView);
          return "successMember";
      }
  
  }
  </code></pre>
  
  <p><strong>View</strong></p>
  
  <pre><code>public class PersonView {
  
      private boolean isSupervisor;
      private boolean isManager;
      private List&lt;Person&gt; personList;
  
  
      public boolean isSupervisor() {
          return isSupervisor;
      }
  
      public void setSupervisor(boolean isSupervisor) {
          this.isSupervisor = isSupervisor;
      }
  
      public boolean isManager() {
          return isManager;
      }
  
      public void setManager(boolean isManager) {
          this.isManager = isManager;
      }
  
      public List&lt;Person&gt; getPersonList() {
          return personList;
      }
  
      public void setPersonList(List&lt;Person&gt; personList) {
          this.personList = personList;
      }
  
  }
  </code></pre>
  
  <p><strong>Domain</strong></p>
  
  <pre><code>public class Person {
  
    private String fullName; 
    private Boolean isSupervisor;
    private Boolean isManager;
  
  public String getFullName() {
      return fullName;
  }
  
  public void setFullName(String fullName) {
      this.fullName = fullName;
  }
  
  public Boolean getIsSupervisor() {
      return isSupervisor;
  }
  
  public void setIsSupervisor(Boolean isSupervisor) {
      this.isSupervisor = isSupervisor;
  }
  
  public Boolean getIsManager() {
      return isManager;
  }
  
  public void setIsManager(Boolean isManager) {
      this.isManager = isManager;
  }
  
  }
  </code></pre>
  
  <p><strong>JSP</strong></p>
  
  <pre><code>        &lt;html&gt;
          &lt;title&gt;Persons Information&lt;/title&gt;
          &lt;/head&gt;
  
          &lt;body&gt;
  
              &lt;form:form method="POST" modelAttribute="personView"&gt;
                  &lt;table&gt;
                      &lt;tr&gt;
                          &lt;th&gt;Full Name&lt;/th&gt;
                          &lt;th&gt;Supervisor&lt;/th&gt;
                          &lt;th&gt;Manager&lt;/th&gt;
                      &lt;/tr&gt;
  
                      &lt;c:forEach var="person" items="${personView.personList}"
                          varStatus="row"&gt;
                          &lt;tr&gt;
                              &lt;td&gt;{person.fullName}&lt;/td&gt;
                              &lt;td&gt;&lt;form:checkbox path="isSupervisor"
                                      value="${person.isSupervisor}" /&gt;&lt;/td&gt;
                              &lt;td&gt;&lt;form:checkbox path="isManager"
                                      value="${person.isManager}" /&gt;&lt;/td&gt;
                          &lt;/tr&gt;
                      &lt;/c:forEach&gt;
  
  
                      &lt;tr&gt;
                          &lt;td&gt;&lt;input type="submit" name="submit" value="Submit"&gt;
                          &lt;/td&gt;
                      &lt;/tr&gt;
                      &lt;tr&gt;
                  &lt;/table&gt;
              &lt;/form:form&gt;
  
          &lt;/body&gt;
          &lt;/html&gt;
  </code></pre>
  
  <p>Any Suggestion</p>