You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Brandon Goodin <ma...@phase.ws> on 2003/01/24 04:26:38 UTC

NEW! ValidatorLookupDispatchAction

I just put together a class that uses the Validator from within a
LookupDispatchAction. The class could be easily included into the Struts
distribution. It is very useful to have the validation available to call
from within the DispatchAction because different methods require different
validation. Anyways, I have heard others speak of Action based validation
(Craig included). This is not as useful in regular action forms because the
mapping allows for the flexibility. But for those of us who use the
Dispatch... this type of validation is uesful. The code should be ready to
drop in with no changes.

FYI - The class extends DispatchAction and uses the same code as the
LookupDispatchAction. I took the validation code from the
ValidatorActionForm and included it in the ValidatorLookupDispatchAction
class with some minor changes.

Basically, the key that is looked up in the validation.xml form name is the
ActionMapping url plus a dot method name. (.i.e. /myAction.do.edit <- edit
is the method name).

Any committers willing to give it a thumbs up!?

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



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: NEW! ValidatorLookupDispatchAction

Posted by Ted Husted <hu...@apache.org>.
Attach it to a Bugzilla ticket and we can look at as soon as Struts 1.1 
ships. Thanks for contributing ths, Brandon =:0)

Brandon Goodin wrote:
> I just put together a class that uses the Validator from within a
> LookupDispatchAction. The class could be easily included into the Struts
> distribution. It is very useful to have the validation available to call
> from within the DispatchAction because different methods require different
> validation. Anyways, I have heard others speak of Action based validation
> (Craig included). This is not as useful in regular action forms because the
> mapping allows for the flexibility. But for those of us who use the
> Dispatch... this type of validation is uesful. The code should be ready to
> drop in with no changes.
> 
> FYI - The class extends DispatchAction and uses the same code as the
> LookupDispatchAction. I took the validation code from the
> ValidatorActionForm and included it in the ValidatorLookupDispatchAction
> class with some minor changes.
> 
> Basically, the key that is looked up in the validation.xml form name is the
> ActionMapping url plus a dot method name. (.i.e. /myAction.do.edit <- edit
> is the method name).
> 
> Any committers willing to give it a thumbs up!?
> 
> Brandon Goodin
> Phase Web and Multimedia
> P (406) 862-2245
> F (406) 862-0354
> mail@phase.ws
> http://www.phase.ws
> 
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 
> 


-- 
Ted Husted,
Struts in Action <http://husted.com/struts/book.html>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>