Thiago,
I thought about the service idea, but what would it look like?
    Class extractPageClass(String requestPath) would be what I'd want.

However, for each Dispatcher, you'd want a PageClassExtracter as well, and I'm sure there'd be lots of duplication. To stay DRY, I guess we have to add the extractPageClass method to the Dispatcher interface, which is not very nice, especially as the AssetDispatcher does not use pages. Maybe we could extend Dispatcher to UsesPagesDispatcher that has our method. Now, we can iterate through the Dispatcher pipeline, and call extractPageClass only on the UsesPagesDispatchers.

Does that all make sense? Or is there a better way?
Ciao,
Jonathan

On 05/02/2009 18:59, Thiago H. de Paula Figueiredo wrote:
Em Thu, 05 Feb 2009 07:40:24 -0300, Jonathan O'Connor <ninki...@eircom.net> escreveu:

Daniel,
I was looking at this problem the other day, and you should look at the ComponentEventDispatcher. I think you need to first check if you get a matching page, and then check if you have an event. You can then extract the Pagename from the request path using that monster Reg exp. Sadly, this all relies on internal code :-(

I have the same need of extracting the page name from a Request. Should we file a JIRA to have a public service that does that?


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

Reply via email to