title: Binding errors with list
body: <p>I generated a form:</p>
  
  <pre><code>&lt;form:form action="${contextPath}/draw/constraints.do" method="post" modelAttribute="order"&gt; &lt;c:forEach items="${order.myDrawsAsArray}" var="draw" varStatus="status"&gt;
  &lt;label class="radio-inline"&gt;&lt;form:radiobutton path="myDrawsAsArray[${status.index}].readable" value="true" /&gt; yes&lt;/label&gt;
  &lt;label class="radio-inline"&gt;&lt;form:radiobutton path="myDrawsAsArray[${status.index}].readable" value="false" /&gt; no&lt;/label&gt;
  &lt;/c:forEach&gt;&lt;/form:form&gt;
  </code></pre>
  
  <p>When I submit it to update my entities, I got the following exception:</p>
  
  <blockquote>
    <p>org.springframework.web.util.NestedServletException: Request
    processing failed; nested exception is
    org.springframework.beans.InvalidPropertyException: Invalid property
    'myDrawsAsArray[0]' of bean class [com.entity.Order3d]: Getter
    for property 'myDrawsAsArray' threw exception; nested exception is
    java.lang.reflect.InvocationTargetException
    org.springframework.beans.InvalidPropertyException: Invalid property
    'myDrawsAsArray[0]' of bean class [com.entity.Order3d]: Getter
    for property 'myDrawsAsArray' threw exception; nested exception is
    java.lang.reflect.InvocationTargetException
    java.lang.reflect.InvocationTargetException
    java.lang.NullPointerException
      com.entity.Order3d.getMyDrawsAsArray(Order3d.java:121)</p>
  </blockquote>
  
  <p>My controller is like this:</p>
  
  <pre><code>@Controller
  @RequestMapping("/draw")
  public class PrintingController {
      @RequestMapping(value="/constraints")
      public String constraints(
                  @ModelAttribute Order3d order,
                  @RequestParam("order") int id,
                  @RequestParam(value="save", required=false) String save,
                  Model m) {
          Session s=HibernateUtils.getSessionFactory().openSession();
          if(save!=null) {
              System.out.println(order.getMyDraws());
              for(DrawFile df : order.getMyDraws())
                  s.saveOrUpdate(df);
          }
          Order3d o=(Order3d)s.createCriteria(Order3d.class).add(Restrictions.eq("id", id)).uniqueResult();
          m.addAttribute("order", o);
          s.close();
          return "3dconstraints";
      }
  }
  </code></pre>
  
  <p>I also post my entities if you need them:</p>
  
  <pre><code>@Entity
  @Table (name="order3d")
  public class Order3d implements Serializable {
      private static final long serialVersionUID = -2241346447352903470L;
      public enum State {DEMAND, ESTIMATED, PAYED, PENDING, PRODUCED, SENT, DELIVERED};
      @Id
      @GeneratedValue(strategy=GenerationType.AUTO)
      @Column (name="id")
      private int id;
      @OneToMany(mappedBy="order3d", fetch = FetchType.EAGER, cascade=CascadeType.ALL)
      private Set&lt;DrawFile&gt; myDraws;
  public Set&lt;DrawFile&gt; getMyDraws() {
      return myDraws;
  }
  public List&lt;DrawFile&gt; getMyDrawsAsList() {
      return new ArrayList&lt;DrawFile&gt;(myDraws);
  }
  public Object[] getMyDrawsAsArray() {
      return myDraws.toArray(); //line 121
  }
      //other getters &amp; setters
      public Order3d() {}
  }
  @Entity
  @Table (name="draw", uniqueConstraints=@UniqueConstraint(columnNames="hashname"))
  public class DrawFile implements Serializable {
      private static final long serialVersionUID = -9024754876558087847L;
      @Id
      @GeneratedValue(strategy=GenerationType.AUTO)
      @Column (name="id")
      private int id;
      @Column (name="hashname", columnDefinition="CHAR(64)")
      private String hashname;
      @Column (name="filename")
      private String filename="";
      @Column (name="readable", columnDefinition = "BIT", length = 1)
      private Boolean readable;
      //getters &amp; setters
      public DrawFile() {}
  }
  </code></pre>
  
  <p>I searched on the web but I didn't find a solution. Any idea?</p>