Yeah, I think my OGNL expression usage is not correct but I tried
several combination, none of them work.  

If I declare my variable as:
ArrayList<ArrayList<User>> userList = new ArrayList<ArrayList<User>>();
//getter and settter

I tried this on JSP and it didn't work.
<s:iterator value="userList" id="userList" status="outerStatus">
    <s:iterator value="#userList" status="innerStatus">
            <s:textfield
name="userList[%{outerStatus.index}].[%{innerStatus.index}].name"/>
            <s:textfield
name="userList[%{outerStatus.index}].[%{innerStatus.index}].email"/>
            <s:textfield
name="userList[%{outerStatus.index}].[%{innerStatus.index}].address"/>
    </s:iterator>
</s:iterator>

-----Original Message-----
From: musom...@aol.com [mailto:musom...@aol.com] 
Sent: Friday, February 20, 2009 7:27 PM
To: user@struts.apache.org
Subject: Re: Nested iterator struts 2.1.6 -- automatically rebuild the
collection


 
What do you have inside the iterator tag?? Hard to diagnose without
knowing what you have. Some possible causes:
A a possible OGNL expression error inside your iterator tag. 
If the Sample objects are not built-in java objects (String, Date..) you
might be having type conversion problems? 
Are you sending the information back to the same action or is there a
possible mix-up in the attributes of your tags
Chris


 


 

-----Original Message-----
From: Phan, Hienthuc T <hienthuc_p...@merck.com>
To: Struts Users Mailing List <user@struts.apache.org>
Sent: Mon, 9 Feb 2009 5:46 pm
Subject: Nested iterator struts 2.1.6 -- automatically rebuild the
collection










Hi,

Using <s:iterator ..> tag, how do you instruct struts to rebuild the
collection automatically?

I have a List of List of Sample objects
I use <s:iterator > tag to loop through and display data for user to
make changes
The displaying part is OK; however, when the form is submitted, the List
of List of Sample objects is not populated.

In Struts 1.x, the tag <logic:iterator > was used and if we add
indexed=true for each element inside the <logic:iterator > tag, Struts
automatically rebuild the collection.  Is there a way that it can
accomplish with <s:iterator>?

Thank you.


Notice:  This e-mail message, together with any attachments, contains
information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station,
New Jersey, USA 08889), and/or its affiliates (which may be known
outside the United States as Merck Frosst, Merck Sharp & Dohme or
MSD and in Japan, as Banyu - direct contact information for affiliates
is
available at http://www.merck.com/contact/contacts.html) that may be
confidential, proprietary copyrighted and/or legally privileged. It is
intended solely for the use of the individual or entity named on this
message. If you are not the intended recipient, and have received this
message in error, please notify us immediately by reply e-mail and
then delete it from your system.



 

Notice:  This e-mail message, together with any attachments, contains
information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station,
New Jersey, USA 08889), and/or its affiliates (which may be known
outside the United States as Merck Frosst, Merck Sharp & Dohme or
MSD and in Japan, as Banyu - direct contact information for affiliates is
available at http://www.merck.com/contact/contacts.html) that may be
confidential, proprietary copyrighted and/or legally privileged. It is
intended solely for the use of the individual or entity named on this
message. If you are not the intended recipient, and have received this
message in error, please notify us immediately by reply e-mail and
then delete it from your system.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to