I have an object cashBookForm containing an ArrayList of CashBookFormRow containing an ArrayList of TaxLineForms. The jsp page seems ok but when the request is passed on to some action to extract out the property taxDescription(2nd level) i keep on getting empty String. The value of creditAmt(1st level) gets passed over successfully. Can somone help me out please?
When nesting one iterate tag inside another, you need to use the <nested:iterate> and <nested:text> tags. When the html is rendered, these tags will take into account the fact that you are nesting more than one level deep and see that the html is constructed correctly to allow struts to know how to save the input data. Take some time to study the documentation on the <nested:xxxx> tags, and you'll understand what I'm talking about.
Even with the <nested:xxxx> tags, I find that if I'm doing something a little out of the ordinary (such as naming the getter for the collection differently than the getter for a single element of the collection) Struts still doesn't do it correctly, and I need to resort to using a scriptlet to construct the property name myself, as in: