Hi all,
i have a form bean with a list property of complex object which also
contains a list of objects. When iterating over the first list and using
indexed elements, then values of the first list are transferred back when
submitting the form. The values of the inner list is displayed correctly
but is not transmitted back on submit.
Form Bean:
- some String properties
- a List property of Data1 objects
Data1 Object:
- some String properties
- a List property of Data2 object
Data2 Object:
- some String properties
JSP looks somehow like the following:
---snip
<html:form action="/action.do">
<!-- fb is the form bean -->
<html:text name="fb" property="s1"/>
<html:text name="fb" property="s2"/>
<logic:iterate id="d1" indexId="d1index" name="fb" property="data1list"
type="test.Data1">
<html:text name="d1" property="d1_s1" indexed="true"/>
<html:text name="d1" property="d1_s2" indexed="true"/>
<logic:iterate id="d2" indexId="d2index" name="d1" property="data2list"
type="test.Data2">
<html:text name="d2" property="d2_s1" indexed="true"/>
<html:text name="d2" property="d2_s2" indexed="true"/>
</logic:iterate>
</logic:iterate>
</html:form>
---snip
I've implemented the method getD1(int index) (+ normal getter/setter) in
the form bean and also corresponing methods in the Data1 class.
The List of Data2 object is null when the form is submitted.
Thanks for help.
Jörg Eichhorn
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]