Add @Inherited to @ValidationMethod annotation
----------------------------------------------
Key: STS-598
URL: http://www.stripesframework.org/jira/browse/STS-598
Project: Stripes
Issue Type: Improvement
Components: Validation
Affects Versions: Release 1.4.3
Environment: All
Reporter: Andrew Jaquith
Priority: Minor
Just noticed an interesting behavior with the @ValidationMethod annotation, and
its inheritence or lack thereof.
Imagine an abstract ActionBean AbstractFooActionBean, and a concrete subclass
BarActionBean.
Suppose AbstractFooActionBean contains an annotation @Before for a pre-action
method preAction() that executes before the BindingAndValidation stage. Suppose
it also has a @ValidationMethod annotation for a validation method called
validate(), which fires on event "save".
Now, suppose we have a concrete class BarActionBean with a method save() that
handles event "save."
Now, suppose we locate and bind BarActionBean via an URLBinding or a
useActionBean tag. The debugger shows preAction() fires, as expected, before
the BindingAndValidation stage. Lovely! The reason this works is because the
@Before annotation, as defined by Stripes, has an @Inherited annotation.
But when BarActionBean's "save" event executes, the @ValidationMethod does not
fire -- because there is no @Inherited annotation on the ValidationMethod
annotation class.
This seems a little inconsistent. If the Before annotation is inherited,
shouldn't the ValidationMethod annotation be inherited too? My request,
therefore is to make the ValidationMethod annotation inherited.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://www.stripesframework.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development