tapestry-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rich M <rich...@moremagic.com>
Subject Re: Capturing action, event, form requests
Date Tue, 01 Mar 2011 17:55:52 GMT
On 03/01/2011 11:26 AM, Thiago H. de Paula Figueiredo wrote:
> On Tue, 01 Mar 2011 13:03:34 -0300, Rich M <richard@moremagic.com> wrote:
>> Hi,
> Hi!
>> I currently have a Dispatcher implementation to handle page and asset 
>> requests in order to process authentication and security logic as 
>> necessary. However, it appears to me that (at least in 5.1) the 
>> Dispatcher does not intercept any ActionLinks, EventLinks, form 
>> events, or otherwise related client-side triggers that are not page 
>> requests.
> These scenarios should be handled by implementing one of the Tapestry 
> filter pipelines.
> Dispatchers are supposed to return content after handling a request.
Oh, I see. Perhaps then it's reasonable to say I was mislead by this 
Tapestry wiki page 
http://wiki.apache.org/tapestry/Tapestry5HowToCreateADispatcher ? This 
is pretty much exactly what I adapted to my application half a year ago, 
'AccessController' name and all.
>> Is there a service or service interface to implement that would 
>> provide an opportunity to step in and intercept these requests before 
>> a page/component catches them?
> Implement a ComponentRequestFilter and contribute it to the 
> ComponentRequestHandler service.
Thanks, I'll look into that. Going back and looking at that wiki page 
though I realized that it was ordering the AccessController with 
before:PageRender, I switched it to before:RootPath and it seems to now 
capture the events I was talking about and solved a related problem I had.

I am in fact using the Dispatcher to redirect to a login page with an 
expired context, I suppose I'm not entirely clear yet between the Wiki 
and my working implementation why Dispatcher isn't appropriate. Perhaps 
its a case of, 'it will work, but that's not what it was meant for'? Or 
are there some nuances to the ComponentRequestHandler pipeline that make 
it a more robust authentication point?


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

View raw message