At last it works!!! Thanks very much for your help

Ciaran

-----Original Message-----
From: Nitesh [mailto:[EMAIL PROTECTED] 
Sent: 30 June 2005 11:17
To: Struts Users Mailing List
Subject: Re: DynaActionForm values problem after submit

should've been
<logic:iterate name="paymentsForm" property="payments" id="payments">
    <html:text name="payments" property="paymentAmount" indexed="true" />
</logic:iterate>

basically your generated html would look like...
<input type="text" name="payments[0].paymentAmount" />
<input type="text" name="payments[1].paymentAmount" />
...

HTH
Nitesh

----- Original Message ----- 
From: "Marsh-Bourdon, Christopher" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <user@struts.apache.org>
Sent: Thursday, June 30, 2005 3:15 PM
Subject: RE: DynaActionForm values problem after submit


> Is it the name of the property is 'paymentAmount' yet in the form 
> definition
> it states the name as 'payments'?
>
> Christopher Marsh-Bourdon
> www.marsh-bourdon.com
>
>
> -----Original Message-----
> From: Ciaran Hanley [mailto:[EMAIL PROTECTED]
> Sent: 30 June 2005 10:42
> To: 'Struts User Mailing List'
> Subject: DynaActionForm values problem after submit
>
> Can anybody help me with the problem below please. I've hit a brick wall
> with it! :)
>
> -----Original Message-----
> From: Ciaran Hanley [mailto:[EMAIL PROTECTED]
> Sent: 28 June 2005 20:02
> To: 'Struts User Mailing List'
> Subject: Unable to read DynaForm array values
>
> I have the following DynaActionForm bean (where EditPaymentForm extends
> DynaActionForm so I can use the validation method) and corresponding 
> action
> mapping
>
> <form-bean name="paymentsForm" type="app.EditPaymentForm">
>  <form-property name="payments" type="app.PaymentBean[]"/>
>  <form-property name="name" type="java.lang.String" /> </form-bean>
>
> <action path="/editpayments"
>        type="app.EditPaymentAction"
>        name="paymentsForm"
>        scope="session">
> </action>
>
>
> I pre-populate this form in my Action class for display on a JSP for
> editing. The values show up fine in the JSP text boxes. When the form is
> submitted the String name property changes fine, but the values in the
> payments array is not being saved. I just get the original pre-populated
> data when I use the get methods after submitting.
>
> Here is a snippet from the JSP
>
> <html:form action="/editpayments?action=edit">
>  <logic:iterate name="paymentsForm" property="payments" id="PaymentBean">
>    <html:text name="PaymentBean" property="paymentAmount" indexed="true" 
> />
>  </logic:iterate>
>  <html:text property="name" />
>
> <!-- etc -->
>
>
> And here is form class
>
> public class EditPaymentForm extends DynaActionForm implements 
> Serializable
> {
>      public ActionErrors validate(ActionMapping mapping, 
> HttpServletRequest
> request)
>      {
>            //custom checks
>      }
> }
>
> Can anybody help me figure out why the values aren't being saved upon
> submitting the form please?
>
> Thanks
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
----------------------------------------------------------------------------
----
> The information contained herein is confidential and is intended solely 
> for the
> addressee. Access by any other party is unauthorised without the express
> written permission of the sender. If you are not the intended recipient, 
> please
> contact the sender either via the company switchboard on +44 (0)20 7623 
> 8000, or
> via e-mail return. If you have received this e-mail in error or wish to 
> read our
> e-mail disclaimer statement and monitoring policy, please refer to
> http://www.drkw.com/disc/email/ or contact the sender. 3166
>
----------------------------------------------------------------------------
----
>
>
> ---------------------------------------------------------------------
> 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]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to