Reputation: 16151
my app seems to work correctly, but in the console it throws a lot of StalePageException
s. I dont know why. How can i debug the cause for this exceptions? What are commons reasons for this Exception?
13:32:29,361 WARN [RequestCycleExtra] (default task-60) ********************************
13:32:29,362 WARN [RequestCycleExtra] (default task-60) Handling the following exception: org.apache.wicket.core.request.mapper.StalePageException
13:32:29,363 WARN [RequestCycleExtra] (default task-60) ********************************
13:32:35,626 WARN [RequestCycleExtra] (default task-64) ********************************
13:32:35,627 WARN [RequestCycleExtra] (default task-64) Handling the following exception: org.apache.wicket.core.request.mapper.StalePageException
I use the lastest Wicket version - 6.18 but i have this forever.
EDIT:
StatementGokListPanel.java
columns.add(new StatementLinkColumn(Model.of("")) {
@Override
public void onClick(IModel<StatementGokCommunity> model, AjaxRequestTarget target) {
ComponentMode componentMode = ComponentMode.EDIT;
MarkupContainer mc = StatementGokListPanel.this.getParent();
GokCommunityStatementPanel panel = new GokCommunityStatementPanel("panel", model.getObject(), componentMode, true);
StatementGokListPanel.this.replaceWith(panel);
target.add(mc);
}
});
Upvotes: 4
Views: 4568
Reputation: 17533
The exception is being thrown if you try to use a page instance that has been rendered in another browser tab/window. Since Wicket cannot know whether you have changed the page structure in the other tab it just suppresses the action (e.g. link click, form submit, etc.) and re-renders the page instance with its latest state from the server.
The exception also may happen if you use browser's "View (page) source" functionality.
Upvotes: 5