Probably you should try using the validator framework for validation.
you could avoid using the custom form in case you just use it for validation.
You could add in your validations into the validation-rules and use it.

Make sure your form has sesion scope.
That apart, Im not sure why you don't get the updated values...


Nitesh


----- Original Message ----- From: "Ciaran Hanley" <[EMAIL PROTECTED]>
To: "'Struts User Mailing List'" <struts-user@jakarta.apache.org>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, June 28, 2005 7:23 PM
Subject: Re: How to create form rows dynamically


Hi,

I followed the example you attached and it seemed to have worked except when
I submit the form I cannot get at the form values.

For example when I submit the form if the newAmnt text box gets a new value
of say 10.00, the value on the server side is still returned as 0.00 (the
original value).

Would you know what might cause this? I am using a form which extends
DynaActionForm so I can use the validation method.

-----Original Message-----
From: Nitesh [mailto:[EMAIL PROTECTED]
Sent: 23 June 2005 10:50
To: Struts Users Mailing List
Subject: Re: How to create form rows dynamically

Attaching the answer John had given me for indexed properties.
Hope this would help...


----- Original Message ----- From: "Ciaran Hanley" <[EMAIL PROTECTED]>
To: "'Struts User Mailing List'" <struts-user@jakarta.apache.org>
Sent: Thursday, June 23, 2005 3:01 PM
Subject: How to create form rows dynamically


Can somebody help me or propose a solution to the following please.



I wish to create a form dynamically. Depending on the business logic there
could be 0 to N rows in the form. I tried to use a form with an array of
strings and use the indexed="true" setting in the html:text boxes but as I
was not following any example I ran into problems and didn't have any
guide
as to where I was going wrong.



I also need to iterate over a bean containing information which
corresponds
to the form as the form boxes are being displayed.



Say if there is 3 rows required, it should ok like the following.



Payment     Old Amnt    New Amnt          Date

1           35          [45]              [12/12/04]

2           35          [45]              [12/01/05]

3           35          [45]              [12/02/05]



Where [] represents a html:text box.



I am also unsure as to how to access these values when I get to the
form/action classes.



Any help would be much appreciated!







--------------------------------------------------------------------------------


---------------------------------------------------------------------
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