struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Gilday" <martin.li...@imap.cc>
Subject Re: [s2] Different Annotated Validations for different action methods
Date Tue, 04 Dec 2007 12:24:45 GMT
I posted about this a while back.  Nobody seemed to have an annotation
based solution, only going back to XML.


----- Original message -----
From: "Thilo Ettelt" <te@carmunity.de>
To: "Struts Users Mailing List" <user@struts.apache.org>
Date: Tue, 4 Dec 2007 13:01:15 +0100
Subject: [s2] Different Annotated Validations for different action
methods

Hey all,

I'm trying to figure out how to validate my action methods differently.

For example I've got a modeldriven User bean with the following two  
annotated methods

@Validations(...)
- processLogin

@Validations(...)
- processSignup



Now I want the first annotation to only check for the username and  
password, but the second annotation is supposed to check for other  
things like email too.

However when I call the appropriate action mapping which calls  
processSignup it processes both Validations, which results in a  
invalid email address error for the login in addition to the wrong  
username and password.

So how can I separate the two validatio annotations without needing  
separate classes?


- Thilo

-- 
Mit freundlichen Grüßen,

Thilo Ettelt              Telefon: +49-421-6265-111
Carmunity.com GmbH        Telefax: +49-421-6265-100
Mary-Astell-Strasse 2     E-Mail: te@carmunity.de
28359 Bremen              http://www.carmunity.de/

Developer (YourVids)

Handelsregisternummer: HRB 19256 beim AG Bremen
Geschäftsführer:
Dipl.-Wirt.-Ing. W. Schlösser
Dipl-Ing. Frank Rothgänger
Bennet Bock


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


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


Mime
View raw message