I have a command object composed of primitive fields and an object field. How do I bind my form fields to the fields in the object?
I tried doing this but to no avail
<form:form commandName="course" method="POST">
<form:input path="activity.activity"/>
.
.
.
</form:form>
I get this error
org.springframework.beans.NotReadablePropertyException:
Invalid property 'course' of bean class
My Command class is like this
public class Course {
private long id;
private String owner;
private String title;
private List<LearningActivity> activity = new ArrayList<LearningActivity>();
//getters and setters
}
public class LearningActivity {
private long ID;
private String activity;
private String link;
//getters and setters
}