On Fri, Nov 25, 2016 at 2:23 PM, Nathan Quirynen < nat...@pensionarchitects.be> wrote:
> Hi, > Hi! I made an implementation of Dispatcher. I want to get the page name from > the request path. Is there any service I can use to achieve this? > > I know in a ComponentRequestFilter for example I can use > PageRenderRequestParameters..getActivePageName(), but how can I do the > same inside a Dispatcher implementation? > Inject the ComponentEventLinkencoder service into your dispatcher and use its decodePageRenderRequest(Request) method, which is exactly the same Tapestry uses internally. It returns a PageRenderRequestParameters object, which contains a getLogicalPageName() method which is exactly what you need.