Hi,

i'm having a problem using custom annotations and a ComponentRequestFilter.
I am defining my own class annotation (TestAnnotation) and a test class
(Index) that uses this annotation.

In my ComponentRequestFilter however, when i am checking the page class (via
componentSource.getPage().getClass(), it doesn't have the annotation.
However, When i try to read the annotation on the class itself (using
Index.class), it's working.

Therefore i assume this has something to do with class transformation in
tapestry, it seems like the class annotation isn't present in the
transformed class anymore.

I have of course read the article at
http://tapestryjava.blogspot.com/2009/12/securing-tapestry-pages-with.html,
and i can't see any difference:

Component page = componentSource.getPage(pageName);
if (! page.getClass().isAnnotationPresent(RequiresLogin.class)) {
        return false;
}

is exactly what I'm using (except for the different variable names...), it
just doesn't work.

When i try 

Index.class.isAnnotationPresent(TestAnnotation.class)

it returns true, just as expected.

If anyone got a good idea, i'd be very thankful.

Regards,
Sascha
-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Annotations-and-ComponentRequestFilter-Problem-tp3232159p3232159.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to