struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Neil Aggarwal" <n...@JAMMConsulting.com>
Subject RE: Not getting submitted values from textarea in logic:iterate
Date Thu, 21 Jul 2005 20:47:53 GMT
Hello:

Does anyone have any ideas on how to get this to work?

Is this a bug?

Thanks,
	Neil


--
Neil Aggarwal, JAMM Consulting, (214) 986-3533, www.JAMMConsulting.com
FREE! Valuable info on how your business can reduce operating costs by
17% or more in 6 months or less! http://newsletter.JAMMConsulting.com

> -----Original Message-----
> From: Neil Aggarwal [mailto:neil@jammconsulting.com] 
> Sent: Wednesday, July 20, 2005 10:41 AM
> To: 'Struts Users Mailing List'
> Subject: Not getting submitted values from textarea in logic:iterate
> 
> 
> Hello:
> 
> I have a DynaForm with some beans stored in an array:
>     <form-bean name="admin.editClubForm"
> type="org.apache.struts.validator.DynaValidatorForm">
>       <form-property name="features" 
> type="persistent.Feature[]"/>        
>     </form-bean>
> 
> I have the form-bean declared as session scope for my actions:
>     <action path="/admin/editClubInit" type="admin.EditClubInit"
> name="admin.editClubForm" scope="session">
>       <forward name="success" path="/admin/editClub.do"/>
>     </action>    
>     <action path="/admin/editClub" forward="admin.editClub" />
>     <action path="/admin/editClubAction" type="admin.EditClubAction"
> name="admin.editClubForm" scope="session">
>       <forward name="failure" path="/admin/editClub.do"/> 
>       <forward name="success" path="/admin/showClubs.do" 
> redirect="true" /> 
>     </action>
> 
> The persistent.Feature class has a field text with setText and getText
> accessors.
> 
> When want want to display the data, I first call /admin/editClubInit
> to populate the DynaForm.  Here is the code that does that:
>     Feature[] features = new Feature[NUM_FEATURES];
>     for( int i=0; i<NUM_FEATURES; i++ ) {
> 	features[i] = new persistent.Feature("Test ["+i+"]");
>     }
>     df.set("features", features);
> After populating the form, the EditClubInit action forwards 
> to user to the
> page to
> display the form.  Here is the JSP code that shows the data:
>         <logic:iterate name="admin.editClubForm" property="features"
> id="feature">
>           <br>
>           <html:textarea name="feature" property="text" indexed="true"
> rows="3" cols="75"/>
>         </logic:iterate>
> 
> The data appears correctly on the page.
> 
> Unfortunately, when I submit the form to my action class to 
> process it,
> I do not get the text I submitted.  I get the original text that
> EditClubInit prepopulated the form with.
> 
> Here is the code I am using to retrieve the data:
> 
>       Feature[] features = (Feature[]) df.get("features");
>       for( int i=0; i<features.length; i++ ) {
>         System.err.println( "Feature["+i+"] is 
> "+features[i].getText());
>       }
> 
> Any ideas why this would not be working?
> 
> If you need to see more details, I can provide them.
> I was trying to focus on what I thought would be helpful.
> 
> Thanks,
> 	Neil
> 
> --
> Neil Aggarwal, JAMM Consulting, (214) 986-3533, www.JAMMConsulting.com
> FREE! Valuable info on how your business can reduce operating costs by
> 17% or more in 6 months or less! http://newsletter.JAMMConsulting.com
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 


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


Mime
View raw message