>From: Pierre M�tras <[EMAIL PROTECTED]>

>Have a look at the new ActionError and ActionErrors classes in version 1.0.
>Though there's not yet an accompanying tag to display specific errors, they
>do what you've described:

Cheers, I'll have a look at that


>I've not tried it, but when the "processValidate" fails, it tries to return
>to the input form, setting the errors in the request. From there, you 
>should
>be able to take this kind of decision. You can find which fields have 
>errors
>and decided then on which page you want to redirect the user.

Yeah, but I want that to be done automatically in the majority of cases.

>Just like the discussion on global/local validation, I don't think you can
>factorize a general behavior for error processing. Suppose -- that's a 
>crazy
>example -- that you have a login form with 2 pages: one for the login name
>and the other one for the password. If the validation fails, should the 
>code
>decide to present the login or the password page? Only you can take the
>decision to include business rules like "the user must clear the password 
>if
>he wants to change his login name".

Well, we kind of have a general behaviour for error processing, but it's not 
great for multi page forms. I'm not saying that what I suggested is the one 
and only way that multi page forms should be validated, but for the majority 
of dumb multi page forms, this solution could work quite well.

I try to use as little code as possible that is dependant on the structure 
of the site and/or parameters of pages, because that kind of thing changes 
too often.

Of course the other solution would be to threaten to cause damage to the web 
designers if they dare change the layout :-)

Ned
_____________________________________________________________________________________
Get more from the Web.  FREE MSN Explorer download : http://explorer.msn.com

Reply via email to