Reputation: 1271
I'm using Wicket 6, and we have a situation where a user is hitting back and it's loading the page without initializing it from the page history. I want the page init to run so that data is read fresh and things are in the proper state. How can I make wicket do this?
I thought I was already doing this with a custom MountedMapper that someone had suggested long ago, but I have a breakpoint in the page constructor (the one that accepts PageParameters) and it's not running.
The custom MountedMapper:
if (requestHandler instanceof ListenerInterfaceRequestHandler || requestHandler instanceof BookmarkableListenerInterfaceRequestHandler) {
return null;
} else {
return super.mapHandler(requestHandler);
}
Upvotes: 1
Views: 96
Reputation: 5681
You could make your page stateless, so it is recreated on each access.
Or improved your page, so that it loads fresh data on each render: either use appropriate models that automatically deliver up-to-date data or override #onConfigure() and update,
Upvotes: 2