RE: submit an arraylist
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=submitValueSubmit 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 + 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? _ MSN Explorer: http://explorer.msn.com/lccn/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ MSN Explorer: http://explorer.msn.com/lccn/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: submit an arraylist
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=submitValueSubmit 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 + 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]
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=submitValueSubmit 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=submitValueSubmit Changes/html:submit /html:form it still reports no collection found ThanksRegards 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=submitValueSubmit 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 + 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]
Re: submit an arraylist
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=submitValueSubmit 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=submitValueSubmit Changes/html:submit /html:form it still reports no collection found ThanksRegards 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=submitValueSubmit 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 + 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]
RE: submit an arraylist
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=submitValueSubmit 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=submitValueSubmit 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=submitValueSubmit Changes/html:submit /html:form it still reports no collection found ThanksRegards 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=submitValueSubmit 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 + 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]
Re: submit an arraylist
I think I have done the right ,yet it still doesnt work this is mynested bean file FontBean.java public class FontBean { public int getSize() { return size; } public void setSize(int size) { this.size = size; } public String getFontName() { return fontName; } public void setFontName(String fontName) { this.fontName = fontName; } private int size; private String fontName; } This is my form bean file TestBeanForm.java public class TestBeanForm extends ActionForm { public FontBean[] getTestBean() { return testBean; } public void setTestBean(FontBean[] testBean) { this.testBean = testBean; } private FontBean[] testBean; } this is what I wrote in jsp file html:form action=/testAction.do logic:iterate name=TestBeanForm property=testBean id=mybean indexId=index1 html:text name=mybean property=fontName value=arial indexed=true/ /logic:iterate html:submit property=submitValueSubmit Changes/html:submit /html:form anyway, running the jsp file still tells no collection found what happened? I m exahusted! ThanksRegards 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:59:50 +0100 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=submitValueSubmit 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=submitValueSubmit Changes/html:submit /html:form it still reports no collection found ThanksRegards 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=submitValueSubmit 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 + 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
Re: submit an arraylist
This is totally different than your first question, Mu. You don't think that FontBean[] is the same as ArrayList, do you? You used ArrayList in your original question but that has now become FontBean[]. - Mike At 01:16 AM 3/12/2004, you wrote: I think I have done the right ,yet it still doesnt work this is mynested bean file FontBean.java public class FontBean { public int getSize() { return size; } public void setSize(int size) { this.size = size; } public String getFontName() { return fontName; } public void setFontName(String fontName) { this.fontName = fontName; } private int size; private String fontName; } This is my form bean file TestBeanForm.java public class TestBeanForm extends ActionForm { public FontBean[] getTestBean() { return testBean; } public void setTestBean(FontBean[] testBean) { this.testBean = testBean; } private FontBean[] testBean; } this is what I wrote in jsp file Submit Changes anyway, running the jsp file still tells no collection found what happened? I m exahusted! ThanksRegards From: Mark Lowe Reply-To: Struts Users Mailing List To: Struts Users Mailing List Subject: Re: submit an arraylist Date: Fri, 12 Mar 2004 09:59:50 +0100 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 wrotein jsp file: id=mybean1 indexId=index1Submit Changes it says no collection found I then changed the jsp file to thisid=mybean1 indexId=index1 indexed=true/ Submit Changes it still reports no collection found ThanksRegards From: Mark Lowe Reply-To: Struts Users Mailing List To: Struts Users Mailing List 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 ... On 12 Mar 2004, at 09:23, Mu Mike wrote: I write this in jsp file,but it failedid=mybean1 indexId=0 Submit Changesis my jsp code right? From: Mu Mike Reply-To: Struts Users Mailing List To: [EMAIL PROTECTED] Subject: submit an arraylist Date: Fri, 12 Mar 2004 07:55:33 + 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] _ Ãâ·ÑÏÂÔØ 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]
submit an arraylist
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? _ MSN Explorer: http://explorer.msn.com/lccn/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]