struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ciaran Hanley" <>
Subject DynaActionForm values problem after submit
Date Thu, 30 Jun 2005 09:41:55 GMT
Can anybody help me with the problem below please. I've hit a brick wall
with it! :)

-----Original Message-----
From: Ciaran Hanley [] 
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

<form-bean name="paymentsForm" type="app.EditPaymentForm">
  <form-property name="payments" type="app.PaymentBean[]"/>
  <form-property name="name" type="java.lang.String" /> 

<action path="/editpayments"

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" />
  <html:text property="name" />
<!-- etc -->

And here is form class
public class EditPaymentForm extends DynaActionForm implements Serializable 
      public ActionErrors validate(ActionMapping mapping, HttpServletRequest
            //custom checks

Can anybody help me figure out why the values aren't being saved upon
submitting the form please?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message