You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Harland, David" <Da...@dlapiper.com> on 2005/06/17 11:29:04 UTC
How do you make the form remember the form values even if it
fails validation
Hi,
How do you make the form remember the form values even if it fails the
validation. At the moment I am having to store them in a request
attribute before calling validate. Is there an easier way.
Thanks
Dave.
This e mail is from DLA Piper Rudnick Gray Cary UK LLP.
The contents of this email and any attachments are confidential to the intended recipient. They may not be disclosed to or used by or copied in any way by anyone other than the intended recipient. If this email is received in error, please contact DLA Piper Rudnick Gray Cary UK LLP on +44 (0) 8700 111111 quoting the name of the sender and the email address to which it has been sent and then delete it.
Please note that neither DLA Piper Rudnick Gray Cary UK LLP nor the sender accept any responsibility for viruses and it is your responsibility to scan or otherwise check this email and any attachments.
DLA Piper Rudnick Gray Cary UK LLP is a limited liability partnership registered in England and Wales (registered number OC307847) which provides services from offices in England, Belgium, Germany and the People's Republic of China. A list of members is open for inspection at its registered office and principal place of business 3 Noble Street, London EC2V 7EE. Partner denotes member of a limited liability partnership.
DLA Piper Rudnick Gray Cary UK LLP is regulated by the Law Society and is a member of DLA Piper Rudnick Gray Cary, a global legal services organisation, the members of which are separate and distinct legal entities. For further information, please refer to www.dlapiper.com.
Re: How do you make the form remember the form values even if it fails validation
Posted by Michael Jouravlev <jm...@gmail.com>.
On 6/17/05, Harland, David <Da...@dlapiper.com> wrote:
> Hi,
>
> How do you make the form remember the form values even if it fails the
> validation. At the moment I am having to store them in a request
> attribute before calling validate. Is there an easier way.
>
> Thanks
>
> Dave.
* Use string-type setters
* use session scope for a form bean
You can find some insights here:
http://struts.sourceforge.net/strutsdialogs/dialogaction.html
P.S. It is weird why you have to *store* them before calling
validate(), because standard sequence is reset()/populate/validate().
Thus, if you just received values with request, they should be set in
the form before validate is called.
Michael.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org