struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Hill" <andrew.david.h...@gridnode.com>
Subject RE: [Gurus Invited] Why not an Action Based Validator?
Date Wed, 15 Jan 2003 10:23:50 GMT
+1

-----Original Message-----
From: Phase Web and Multimedia [mailto:mail@phase.ws]
Sent: Wednesday, 15 January 2003 18:30
To: Struts Users Mailing List
Subject: RE: [Gurus Invited] Why not an Action Based Validator?


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.

Thanks,
Brandon Goodin
Phase Web and Multimedia
P (406) 862-2245
F (406) 862-0354
mail@phase.ws
http://www.phase.ws


-----Original Message-----
From: Gemes Tibor [mailto:tib@i-trade.hu]
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
some
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
because
> the collections are empty. So, what I need to do is populate the
collections
> in the ValidatorActionForm again

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

Hth,

Tib

--
To unsubscribe, e-mail:
<mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:struts-user-help@jakarta.apache.org>



--
To unsubscribe, e-mail:
<mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:struts-user-help@jakarta.apache.org>


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message