struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Newton <newton.d...@yahoo.com>
Subject Re: Actions & Validation
Date Mon, 05 Mar 2007 22:01:28 GMT
--- Scott <stanlick@gmail.com> wrote:
> I keep reading about how Actions can be POJOs with
an
> execute method, yet I don't see any examples of
this. 

That's because most Actions need to do more than just
be a POJO; they need to be validated, have access to
the session, etc.

> I need to know if the validation failed so I can 
> return the appropriate String
ActionSupport.WHATEVER. 

If validation fails (and you're implementing
Validateable and/or ValidationAware or subclassing
ActionSupport or etc.) it returns to the input page,
which is what you'd normally want to do.

You can still implement Validateable.validate and
ValidationAware.hasErrors by hand and return whatever
you want.

d.



 
____________________________________________________________________________________
The fish are biting. 
Get more visitors on your site using Yahoo! Search Marketing.
http://searchmarketing.yahoo.com/arp/sponsoredsearch_v2.php

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


Mime
View raw message