Reputation: 11
I am using grails 2.5 , my command object is
class TestCommand{
List aList; // Class A List
}
class A{
String name;
List<B> bList; // Class B List
}
class B{
String name;
}
In my GSP
<g:each var="a" in="${aList}" status="i">
<g:testField name="aList[${i}].name" value="${a?.name}"/>
<g:each var="b" in="${a.bList}" status="j">
<g:testField name="aList[${i}].bList[${j}].name" value="${b?.name}"/>
</g:each>
</g:each>
In my controller I am getting empty list.
Not sure how to rename the input box name so that I can get the concrete list of objects.
Thanks in advance.
Upvotes: 1
Views: 301