[Opensource] Struts Validation in Expresso
Raul DAVIDOVICH
R.DAVIDOVICH at caconcology.com
Tue Mar 9 03:36:06 PST 2004
Hi all,
I'm trying to implement field validation in Expresso using Commons
Validator, in Struts' way.
First I overriden the validate() method in DefaultForm, using a similar
behaviour to the one found in ValidatorActionForm.The difference is that I
made the validtion contexts relative to the state rather than to the action
path; like Struts does.
Next I wrote an ExpressoFieldChecks class which does the same as Struts'
one but it can also use the DefaultForm's methods for accessing the fields
to validate.
Up to here it works as expected.
Now I'm stuck on how to forward back to the requesting state if the
validation fails. I overrided the processValidate() method in
ExpressoRequestProcessor, but I can't manage to figure out how to go back
to the state who generated the form...
Any clues here will be very appreciated
If anyone wants more information on this, feel free to ask me, I'll be glad
to answer
Best regards
---------------------------------------------------
Raul Davidovich
Responsable Informatique
Cvitkovic & Associés Consultants
(33) 1 45 15 40 68
(33) 1 45 15 40 41 Fax
-------------------------------------------------------
http://www.caconcology.com
More information about the Opensource
mailing list