I've been trying to use the same code.

The problem lies apparently in the fact that the class returned by getAnnotation is not Private but a proxy...

...
page anno class=$Proxy40
...


Quoting Moritz Gmelin <[EMAIL PROTECTED]>:

Hi,

I think there is a bug in the Wiki. Try this instead

                Component page = componentSource.getPage(pageName);
                Private prvAnnot = page.getClass().getAnnotation(
                        Private.class);


when your Annotation is called Private of course.
You'll get the annotation if it was present on the page or NULL  otherwise.

M.


Am 29.07.2008 um 13:41 schrieb Carl Crowder:

Hi,

I'm trying to create an access control system using a dispatcher as
described on the wiki page.

I'm following this:
http://wiki.apache.org/tapestry/Tapestry5HowToControlAccess
So that I can use an annotation to declare which pages need a logged- in
user.

It checks the meta-data in the component model for a key called
"private" but it is not being added in my code. As far as I can tell,
there is no place where annotations on the type get converted into
meta-data. Am I missing something? Or do I need to implement my own
ClassTransformWorker to do this?

Thanks,
Carl


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to