Details
Description
From https://github.com/apache/wicket/pull/178:
PageRequestHandlerTracker doesn't work with CryptoMapper.
In mapRequest method in CryptoMapper it is created instance of RequestSettingRequestHandler and PageRequestHandlerTracker doesn't looking for IPageRequestHandler inside IRequestHandlerDelegate.
Reproduce steps:
1 application init method
@Override public void init() { super.init(); getRequestCycleListeners().add(new PageRequestHandlerTracker()); setRootRequestMapper(new CryptoMapper(getRootRequestMapper(), this)); }
2 Try to get last handler in page or component
@Override protected void onBeforeRender() { super.onBeforeRender(); RequestCycle cycle = getRequestCycle(); IPageRequestHandler lastHandler = PageRequestHandlerTracker.getLastHandler(cycle); System.out.println(lastHandler.getPageClass().getCanonicalName()); }