I have the following DynaActionForm bean (where EditPaymentForm extends
DynaActionForm so I can use custom validations) 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.

 

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

 

Reply via email to