Re: Access control with dispatchers and annotations - problem

2008-07-31 Thread Weisu
} > ... > > > Private.java -- > > package uk.bl.dlportal.pages.util; > > import java.lang.annotation.Documented; > import java.lang.annotation.ElementType; > import java.lang.annotation.Retention; > import java.lang.annotation.RetentionPolicy; > import java.lang.annotation.Target; > > @Target(

Re: Access control with dispatchers and annotations - problem

2008-07-30 Thread Martijn Brinkers (List)
Could you try to move all non-page classes/interfaces out of the pages package (same applies to components). So move Private.java to some package other than in components, mixins, base, pages Martijn On Wed, 2008-07-30 at 10:41 +0100, [EMAIL PROTECTED] wrote: > I too have been trying to implem

Re: Access control with dispatchers and annotations - problem

2008-07-30 Thread photos
I too have been trying to implement what is on the wiki. This is really doing my head in (not helped by the fact the wiki solution http://wiki.apache.org/tapestry/Tapestry5HowToControlAccess does not have all the "bits" of code necessary for a newbie like myself to get it working. For insta

Re: Access control with dispatchers and annotations

2008-07-30 Thread Massimo Lusetti
On Tue, Jul 29, 2008 at 3:54 PM, Sven Homburg <[EMAIL PROTECTED]> wrote: > massimo, > > i ask me sometimes, now i ask you ;-) > why do you use the the Restriced annotation not directly > your code RestrictedWorker class seach for Restriced class an injected > some metas into the page/component > a

Re: Access control with dispatchers and annotations

2008-07-29 Thread Carl Crowder
Cheers for all the replies - I've taken Moritz's approach in the end :) I've updated the wiki page to reflect this. Carl Moritz Gmelin wrote: > Hi, > > I think there is a bug in the Wiki. Try this instead > > Component page = componentSource.getPage(pageName); > Private prvAnno

Re: Access control with dispatchers and annotations

2008-07-29 Thread Sven Homburg
massimo, i ask me sometimes, now i ask you ;-) why do you use the the Restriced annotation not directly your code RestrictedWorker class seach for Restriced class an injected some metas into the page/component after that the AccessValidatorImpl ask for the private meta ??? why not directly work th

Re: Access control with dispatchers and annotations

2008-07-29 Thread photos
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

Re: Access control with dispatchers and annotations

2008-07-29 Thread Massimo Lusetti
On Tue, Jul 29, 2008 at 1:41 PM, Carl Crowder <[EMAIL PROTECTED]> wrote: > 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 annotati

Re: Access control with dispatchers and annotations

2008-07-29 Thread Moritz Gmelin
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 th

Access control with dispatchers and annotations

2008-07-29 Thread 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 compone