I don't know if this is a good practice or not, but my app uses two
entries in struts-config. One with validate=true and one with
validate=false. When linking to the page for the first time, I link to
the action with the validation turned off. When submitting the form, I
submit to the action with the validation turned on. This way I can use a
struts action instead of a jsp for the initial page, but the initial page
doesn't show errors before the user gets a chance to enter information.
Peter Maas [EMAIL PROTECTED]
06/08/2005 08:28 AM
Please respond to
Struts Users Mailing List user@struts.apache.org
To
Struts Users Mailing List user@struts.apache.org
cc
Subject
RE: validation -- best practices
I also perform client side validation, however what I don't want is
validation BEFORE the user actually got a change to enter data... which
is what happens now...
On Wed, 2005-06-08 at 07:45 -0400, Kalyanasundaram, Arun Sakthi
(Cognizant) wrote:
Hi Peter,
The validation that is basically performed in the approach you have
specified is client side validation.
Please elaborate more why you want to make a server hit before the data
is validated and corrected in Client side itself.
Thanks and Regards,
Arun Sakthi
-Original Message-
From: Peter Maas [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 08, 2005 5:08 PM
To: Struts Users Mailing List
Subject: validation -- best practices
I have a question about the validation in struts.
Imagine that we have:
- jsp page containing the form to be validated
- formbean extending from ValidatorForm
- action to be executed on submit
- validation rules using the validation plugin
If we put the 'validate' attribute to true in the struts-config and call
the action the form is validated correctly... but even before actually
submitting data!
I know this can be avoided by directy calling the jsp, but especially in
the case of 'retrofitting' an application by adding validation to form
this quite often needs refactoring of links and forwards...
What would be the way to do this?
--
Ing. P.F.M. Maas M.A.
Application Architect / Streaming
Noterik Multimedia BV
Prins Hendrikkade 120
1011 AM Amsterdam
The Netherlands
Tel: +31 (0)205929966 (office)
Tel: +31 (0)205929973 (direct line)
Fax: +31 (0)204688405
Web: www.noterik.nl
--
Take a look at our streaming solutions:
http://www.streamedit.com/demo.html
Get firefox:
http://www.mozilla.org/products/firefox/
---
:wq!
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]