Hi Mike
If you want arraylist to be filled by proper values after submission then you have to
write nested tags
<nested:iterate name="TestBeanForm" property="testBean" id="mybean1"
indexId="index1">
<nested:text property="string1" indexed="true"/> // Note that name is
not there
</nested:iterate>
<html:submit property="submitValue">Submit Changes</html:submit>
</html:form>
Hope this helps
Shashank Dixit
cognizant technology solutions pvt. ltd.
-----Original Message-----
From: Mark Lowe [mailto:[EMAIL PROTECTED]
Sent: Friday, 12 March 2004 8:00 PM
To: Struts Users Mailing List
Subject: Re: submit an arraylist
does your nested bean have a getString1() method?
There's load of examples in the archives. Have a look.
On 12 Mar 2004, at 09:48, Mu Mike wrote:
> Mark
> I did as you wrote
>
> <form-bean name="TestBeanForm" type="com.mycom.form.TestBeanForm"/>
>
> in jsp file:
> <html:form action="/testAction.do">
> <logic:iterate name="TestBeanForm" property="testBean" id="mybean1"
> indexId="index1">
> <html:text name="mybean1" property="string1" indexed="true"/>
> </logic:iterate>
> <html:submit property="submitValue">Submit Changes</html:submit>
> </html:form>
>
> it says "no collection found"
>
> I then changed the jsp file to this
>
> <html:form action="/testAction.do">
> <logic:iterate name="TestBeanForm" property="testBean" id="mybean1"
> indexId="index1">
> <html:text name="mybean1" property="testBean" value="string1"
> indexed="true"/>
> </logic:iterate>
> <html:submit property="submitValue">Submit Changes</html:submit>
> </html:form>
>
> it still reports "no collection found"
>
> Thanks&Regards
>
>
>> From: Mark Lowe <[EMAIL PROTECTED]>
>> Reply-To: "Struts Users Mailing List"
>> <[EMAIL PROTECTED]>
>> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>> Subject: Re: submit an arraylist
>> Date: Fri, 12 Mar 2004 09:35:11 +0100
>>
>>
>> The name in the iterate tag needs to match the name you've using to
>> define the form bean in struts-config
>>
>> <form-bean name="testForm" type="com.mike.struts.TestBeanForm" />
>>
>> <html:form action="/testAction.do">
>> <logic:iterate id="mybean" name="testForm" property="testBean">
>> <html:text name="mybean" property="string1" indexed="true" /> ...
>>
>> On 12 Mar 2004, at 09:23, Mu Mike wrote:
>>
>>> I write this in jsp file,but it failed
>>>
>>> <html:form action="/testAction.do">
>>> <logic:iterate name="TestBeanForm" property="testBean"
>>> id="mybean1" indexId="0">
>>> <html:text property="testBean" value="string1" />
>>> </logic:iterate>
>>> <html:submit property="submitValue">Submit Changes</html:submit>
>>> </html:form>
>>>
>>>
>>> is my jsp code right?
>>>
>>>
>>>> From: "Mu Mike" <[EMAIL PROTECTED]>
>>>> Reply-To: "Struts Users Mailing List"
>>>> <[EMAIL PROTECTED]>
>>>> To: [EMAIL PROTECTED]
>>>> Subject: submit an arraylist
>>>> Date: Fri, 12 Mar 2004 07:55:33 +0000
>>>>
>>>> I have a form as the below
>>>>
>>>> TestBeanForm.java public class TestBeanForm extends ActionForm {
>>>> public ArrayList getTestBean() {
>>>> if(testBean==null) testBean=new ArrayList(); return
>>>> testBean; }
>>>>
>>>> public void setTestBean(ArrayList testBean) { this.testBean =
>>>> testBean; }
>>>>
>>>>
>>>> private ArrayList testBean;
>>>>
>>>> }
>>>>
>>>>
>>>> how should I write in my configruatio file using logic:iterate to
>>>> submit values for my ArrayList testBean?
>>>>
>>>> _________________________________________________________________
>>>> ~{Cb7QOBTX~} MSN Explorer: http://explorer.msn.com/lccn/
>>>>
>>>>
>>>> -------------------------------------------------------------------
>>>> -
>>>> -
>>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>>
>>>
>>> _________________________________________________________________
>>> ~{Cb7QOBTX~} MSN Explorer: http://explorer.msn.com/lccn/
>>>
>>> --------------------------------------------------------------------
>>> -
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>
> _________________________________________________________________
> 享用世界上最大的电子邮件系统― MSN Hotmail。 http://www.hotmail.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
This e-mail and any files transmitted with it are for the sole use of the intended
recipient(s)
and may contain confidential and privileged information.If you are not the intended
recipient,
please contact the sender by reply e-mail and destroy all copies of the original
message.
Any unauthorised review, use, disclosure, dissemination, forwarding, printing or
copying
of this email or any action taken in reliance on this e-mail is strictly prohibited
and may be
unlawful.
Visit us at http://www.cognizant.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]