Howard Lewis Ship wrote: > > I've been doing some cleanup of some internal APIs lately with the > goal to centralizing Tapestry's logic for generating and parsing > component event and page render links. This will allow an application > to override how that information is incorporated into the URL. > > In your case, you could have a Dispatcher recognize the "/venue_name" > part and then generate a PageRenderRequestParameters object and invoke > the ComponentRequestHandler.handlePageRender() pipeline method. > > Note: I'm talking about 5.1 here! >
Hi Howard, all, I've tried to implement this in 5.1 by copying the org.apache.tapestry5.internal.services.PageRenderDispatcher class, renaming it to my package and classname ("SiteDispatcher"), and inserting it into the dispatcher pipeline: public static void bind(ServiceBinder binder) { binder.bind(SiteDispatcher.class).withId("SiteDispatcher"); } public void contributeMasterDispatcher( OrderedConfiguration<Dispatcher> configuration, @InjectService("SiteDispatcher") Dispatcher siteDispatcher) { configuration.add("SiteDispatcher", siteDispatcher, "before:PageRender"); } As that seemed to be what you were suggesting. However, I'm obviously missing something because when I do this, the application links behave very strangely and end up taking me to the index page most times (presumably because the linked page didn't resolve to a known page somehow). I'd rather not have to duplicate functionality, and instead defer to the internals of Tapestry whenever possible. This approach seems to be overriding the page location functionality. I would really appreciate some more details in the suggested approach since I'm not having much luck on my own. Thank you, Levi -- View this message in context: http://n2.nabble.com/-T5--URL-Manipulation-tp2276010p2310454.html Sent from the Tapestry Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org