Max, 

Thanks for your inputs.  But all the fields are declared as properties in
the form with setters and getters.   These fields are resetted in the
reset() method.   I tried with commenting them in the reset() method, but
this does not seem to solve the problem.  Is this a struts default feature
that on validation errors when the request goes to jsp page, it does not
retain the values of the fields.   This will be tedious for a user, that if
one required field is missed, he has to retype for all other fields.  I
found by debug statements in my formbean that in the validate method, the
values are available but when the jsp page is populated, the values are not
available in the get methods.   What can I do to get them back.

Thanks,
Krishna



-----Original Message-----
From: Max Cooper [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 07, 2003 5:23 AM
To: Struts Users Mailing List
Subject: Re: data disappearing in jsp


If the missing fields are display-only, you might need to add hidden fields
to carry their values along in the request when the page is submitted so
that they will be available on a validation error.

reset() is called before the ActionForm is populated with the values from
the request, so I don't think it matters what you do to them there. As long
as they are in the request (and the names in the HTML form match your
ActionForm), they should be populated in the ActionForm when a validation
error occurs.

-Max

----- Original Message ----- 
From: "krishnamohan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, October 06, 2003 6:10 AM
Subject: data disappearing in jsp


> Hi,
>
> In my jsp page I have 5 fields out of which 2 fields are required.   When
> the jsp is submitted I am displaying the error messages for the required
> fields using Action Error in the form bean's validate method.  When the
jsp
> page is displayed with the error messages, the data for the remaining 3
> fields is disappearing.  Can anyone let me know why this is happening.
In
> the reset method all the fields are made to null.
>
> Thanks,
> Krishna
>
> ---------------------------------------------------------------------
> 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