Back Forum Reply New

org.springframework.beans.InvalidPropertyException

I am really new to Spring MVC. I am trying to bind a arrayList of to a command on my form and I am getting an org..beans.InvalidPropertyException  .

here is my command object. The array List is later populated with ProjectCategoryBean-s:
class ProjectCategoryCommand {     private List projectCategories = new ArrayList ();     ... getter and setters
}
class ProjectCategoryBean {   private Integer categoryId;   private Integer subcategoryId;   private String categoryName;   private String subcategoryName;   -- with getter and setters

}

I am using a SpimpleFormController and can repopulate my command as needed without any trouble in the formBackingObject method of the controller. My trouble starts when I try to submit my changes to the controller. I get the error:  org..beans.InvalidPropertyException  : Invalid property 'projectCategories[15]' of bean class [ProjectCategoryCommand]: Index of out of bounds in property path 'projectCategories[15]'; nested exception is java.lang.IndexOutOfBoundsException: Index: 15, Size: 15
org..beans.BeanWrapperImpl.getPrope  rtyValue(BeanWrapperImpl.java:697)

Can anyone help me with this please. I have searched the web section and still have not understood what to do.
¥
Back Forum Reply New