GitHub user amichalowski opened a pull request:
https://github.com/apache/wicket/pull/178
PageRequestHandlerTracker issue
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
```java
@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
```java
@Override
protected void onBeforeRender() {
super.onBeforeRender();
RequestCycle cycle = getRequestCycle();
IPageRequestHandler lastHandler =
PageRequestHandlerTracker.getLastHandler(cycle);
System.out.println(lastHandler.getPageClass().getCanonicalName());
}
```
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/amichalowski/wicket
PageRequestHandlerTracker-bug
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/wicket/pull/178.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #178
----
commit 1496b9fb7b53aa02601d4de7f75dd9814addfe3f
Author: Artur MichaÅowski <[email protected]>
Date: 2016-09-04T19:20:49Z
PageRequestHandlerTracker fix
commit ee51697b6807e9f73f82fcf430720f48918a8d66
Author: Artur MichaÅowski <[email protected]>
Date: 2016-09-05T00:29:44Z
Uses PageRequestHandlerTracker to check last IRequestHandler encapsulated
in IRequestHandlerDelegate
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---