Hi I have the below scenario for my requirements. Im not able to map the nested objects to my form fields ..
Class A{
string a1;
@ManyToOne(cascade={})
B a2;
@ManyToOne(cascade={})
B a3;
}
Class B{
string b1;
string b2
}
Class C{
@ManyToOne(cascade={})
B c1;
String c2;
String c3;
}
Class D{
@ManyToOne(cascade={})
A d2;
String d1;
}
I tried creating Parent class to hold all the above child models as below
Class nested{
A a=new A();
B b=new B();
C c=new C();
D d =new D()'
...
getters/setter()
}
In
jsp
<form:form method="POST" commandName="nested">
<form:input path="nested.A.a1" size="80" />
</form:form>
The above code in jsp throws error as invalid property for nested.no getter/setter found for nested.
Is the above mapping for nested models is correct.?
Also the c2 in the class C needs to be mutiple text boxes of the same form.How can I map the c2 to the multiple form fields in jsp.
Please suggest