RE: Page class annotations (was Re: Checking for a logged in user globally)

2008-03-11 Thread Cordenier Christophe
8 13:12 À : Tapestry users Objet : Re: Page class annotations (was Re: Checking for a logged in user globally) Hi, Cordenier, that's a VERY complicated way to get the class, when, in fact, getClass() on the Component returned by ComponentSource works just fine. So that's not the problem.

Re: Page class annotations (was Re: Checking for a logged in user globally)

2008-03-11 Thread Andreas Pardeike
: mardi 11 mars 2008 11:10 À : Tapestry users Objet : Page class annotations (was Re: Checking for a logged in user globally) Great. One question though. I tried to create my own annotation Access @PageAccess(Access.PUBLIC) public class Start { ... } but Class pageClass = page.getClas

Re: Page class annotations (was Re: Checking for a logged in user globally)

2008-03-11 Thread Filip S. Adamsen
to instantiate components. -Message d'origine- De : Andreas Pardeike [mailto:[EMAIL PROTECTED] Envoyé : mardi 11 mars 2008 11:10 À : Tapestry users Objet : Page class annotations (was Re: Checking for a logged in user globally) Great. One question though. I tried to create my own

RE: Page class annotations (was Re: Checking for a logged in user globally)

2008-03-11 Thread Cordenier Christophe
De : Andreas Pardeike [mailto:[EMAIL PROTECTED] Envoyé : mardi 11 mars 2008 11:10 À : Tapestry users Objet : Page class annotations (was Re: Checking for a logged in user globally) Great. One question though. I tried to create my own annotation Access @PageAccess(Access.PUBLIC) public class S

Page class annotations (was Re: Checking for a logged in user globally)

2008-03-11 Thread Andreas Pardeike
Great. One question though. I tried to create my own annotation Access @PageAccess(Access.PUBLIC) public class Start { ... } but Class pageClass = page.getClass(); PageAccess access = pageClass.getAnnotation(PageAccess.class); fails because there are no annotations in 'page'. What am I doi

Re: Checking for a logged in user globally

2008-03-10 Thread Filip S. Adamsen
Hi, The logical page name is available in the parameters passed to your filter. You can then use the ComponentSource to get at the actual class using the logical page name and extract whatever info you'd like - I use this service along with annotations on my page classes: public class PageAc

Re: Checking for a logged in user globally

2008-03-10 Thread Andreas Pardeike
Hi, I have implemented my access control as below (I also tried contributeRequestHandler) but my main problem is that I have a couple of public pages. I can't see how I could get the current page from within public boolean dispatch(Request request, Response response) or public boolean servic

Re: Checking for a logged in user globally

2007-09-28 Thread Howard Lewis Ship
The logic used by the IoC container is the same whether its injecting via a service binder method or by the constructor of the implementation class. On 9/28/07, Chris Lewis <[EMAIL PROTECTED]> wrote: > > The only interface I implement is Dispatcher, so all should be good. > Thanks for the pointer

Re: Checking for a logged in user globally

2007-09-28 Thread Chris Lewis
The only interface I implement is Dispatcher, so all should be good. Thanks for the pointer on bind() - I will use it. Will I then need to use @Inject/@InjectService in my constructor, or will the container "see" the needed arguments? Howard Lewis Ship wrote: Looks pretty reasonable to me. Y

Re: Checking for a logged in user globally

2007-09-27 Thread Howard Lewis Ship
Looks pretty reasonable to me. You're building the hard way: public static void bind(ServiceBinder binder) { binder.bind(Dispatcher.class, SingletonAccessControllerImpl.class ).withId("AccessController"); } The only other issue (I'd have to check) is to ensure that the interfaces you are imple

Re: Checking for a logged in user globally

2007-09-27 Thread Chris Lewis
Hi Ben, I asked a question like this some time ago, and I've made some good progress like this. I have the same basic requirements as you and specifically do not want my pages to deal with authentication/restriction AT ALL. I did some reading about request handling as well as digging through

Re: Checking for a logged in user globally

2007-09-24 Thread Ben Tomasini
Excellent. Is there a JIRA tracking issue for this? I would be happy to create one if not. On 9/24/07, Howard Lewis Ship <[EMAIL PROTECTED]> wrote: > > I'm looking to add a chain-of-command around handling of render and action > requests; you'll be able to plug in there. > > On 9/24/07, Ben Toma

Re: Checking for a logged in user globally

2007-09-24 Thread Howard Lewis Ship
I'm looking to add a chain-of-command around handling of render and action requests; you'll be able to plug in there. On 9/24/07, Ben Tomasini <[EMAIL PROTECTED]> wrote: > > Hi, > > I am working on an application that requires a logged in user for access > to > any of the pages. My plan is to cre