Prabdoh,
You are much better off using JSTL so you can write something like:
<html:textarea property="${form.object[i].subobject[j].property"/>
Once you go JSTL, you never go back :-) Which makes the <nested> object tags
obsolete.
Paul
--- "Deshmukh, Prabodh (P.)" <[EMAIL PROTECTED]> wrote:
> Looks like using nested tags helps only if I don't have lists/sub-lists
> i.e. the object heirarchy is
> object->sub-object->sub-sub-object->property
>
> <nested:root name="object">
> <nested:iterate property="sub-object" type="..">
> <tr><td>
> <nested:iterate property="sub-sub-object" type ="..">
> <nested:textarea property="property"/>
> </nested:iterate>
> </td></tr>
> </nested:iterate>
> </nested:root>
>
> Any thoughts?
>
> -----Original Message-----
> From: Deshmukh, Prabodh (P.)
> Sent: Monday, November 07, 2005 1:41 PM
> To: 'Struts Users Mailing List'
> Subject: Lists within lists issue
>
>
> Hi,
>
> I have an object that contains a list of sub-objects. These sub-objects
> hold another list (say sub-list) )of sub-sub-objects:
> object->list->sub-object->sub-list->sub-sub-object->property.
>
> I am displaying various properties of the sub-sub-object - which can be
> changed by the user - I want struts to fire the appropriate setters when
> these properties are changed.
>
> Here is how the jsp loop looks like:
> <logic:iterate name="object" property="list" id="sub-object" type="..">
> <tr><td>
> <logic:iterate name="sub-object" property="sub-list"
> id="sub-sub-object" type ="..">
> <html:textarea name="sub-sub-object" property="property"
> indexed="true"/>
> </logic:iterate>
> </td></tr>
> </logic:iterate>
>
> I am able to display the "property" of the "sub-sub-object" - but when
> the user changes the above text area, sub-sub-object.property - doesn't
> get updated.
>
> The html comes out as:
> <tr><td>
> <textarea name="sub-sub-object[0].property">
> </textarea>
> </td></tr>
> <tr><td>
> <textarea name="sub-sub-object[1].property">
> </textarea>
> </td></tr>
> ...
>
> I want the html to be like:
> <tr><td>
> <textarea name="sub-object[0].sub-sub-object[0].property">
> </textarea>
> </td></tr>
> <tr><td>
> <textarea name="sub-object[0].sub-sub-object[1].property">
> </textarea>
> </td></tr>
> ...
> <tr><td>
> <textarea name="sub-object[1].sub-sub-object[0].property">
> </textarea>
> </td></tr>
> <tr><td>
> <textarea name="sub-object[1].sub-sub-object[1].property">
> </textarea>
> </td></tr>
> ...
>
> This will enable struts to fire appropriate object setters.
>
> Constraints: struts1.1 without struts-el tag library.
>
> Any idea of how I can accomplish this?
>
> I will appreciate any responses.
>
> Prabodh Deshmukh.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]