struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Phase Web and Multimedia" <>
Subject RE: [Gurus Invited] Why not an Action Based Validator?
Date Wed, 15 Jan 2003 10:30:15 GMT
But that is my whole point. Complex validation or not. Why don't we handle
both types of validation in the SAME class. I don't want to beat this into
the ground. But, it just seems organizationaly better in my mind to handle
validation on the Action level. With all the great minds on this project I
am certain that there is a good design reason for placing validate in the
ActionForm. I am just curious what it is.

Brandon Goodin
Phase Web and Multimedia
P (406) 862-2245
F (406) 862-0354

-----Original Message-----
From: Gemes Tibor []
Sent: Wednesday, January 15, 2003 2:24 AM
To: Struts Users Mailing List
Subject: Re: [Gurus Invited] Why not an Action Based Validator?

2003. január 15. 10:13 dátummal Phase Web and Multimedia ezt írtad:
> But, can the Validator be called/used from within the action class?

I use the Validator to check if the input is in the appropriate Domain (int,
float, mask, date, etc) which can be checked "static". However there are
validations which require calls to the model. These are checked in the
Action. And these are far more complex so cannot be declared in an xml.

> failure and my input forwards back to the jsp then the page explodes
> the collections are empty. So, what I need to do is populate the
> in the ValidatorActionForm again

For this I put the form into session scope or I give the 'input' attribute
the mapping not the jsp but the action which prepopulates the SELECTs and
forwards to the jsp.



To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message