WICKET-5471 Store the page if it is known that it will be used in a following request
(cherry picked from commit 23172242b84704d8c95bbe168198c99d8b0f5ec4) Project: http://git-wip-us.apache.org/repos/asf/wicket/repo Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/e96dab08 Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/e96dab08 Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/e96dab08 Branch: refs/heads/sandbox/preserve-page-parameters-and-execute-listener-interface-after-expiration Commit: e96dab0801ab21e96472206dacd8052d385a966e Parents: 9969c9e Author: Martin Tzvetanov Grigorov <mgrigo...@apache.org> Authored: Tue Jan 14 23:13:37 2014 +0200 Committer: Martin Tzvetanov Grigorov <mgrigo...@apache.org> Committed: Tue Jan 14 23:14:36 2014 +0200 ---------------------------------------------------------------------- wicket-core/src/main/java/org/apache/wicket/Page.java | 2 ++ .../main/java/org/apache/wicket/request/cycle/RequestCycle.java | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/wicket/blob/e96dab08/wicket-core/src/main/java/org/apache/wicket/Page.java ---------------------------------------------------------------------- diff --git a/wicket-core/src/main/java/org/apache/wicket/Page.java b/wicket-core/src/main/java/org/apache/wicket/Page.java index 1a3e9aa..a58ad9a 100644 --- a/wicket-core/src/main/java/org/apache/wicket/Page.java +++ b/wicket-core/src/main/java/org/apache/wicket/Page.java @@ -965,6 +965,8 @@ public abstract class Page extends MarkupContainer implements IRedirectListener, { setStatelessHint(false); + internalInitialize(); + return new PageReference(numericId); } http://git-wip-us.apache.org/repos/asf/wicket/blob/e96dab08/wicket-core/src/main/java/org/apache/wicket/request/cycle/RequestCycle.java ---------------------------------------------------------------------- diff --git a/wicket-core/src/main/java/org/apache/wicket/request/cycle/RequestCycle.java b/wicket-core/src/main/java/org/apache/wicket/request/cycle/RequestCycle.java index 0a84739..3eaed6a 100644 --- a/wicket-core/src/main/java/org/apache/wicket/request/cycle/RequestCycle.java +++ b/wicket-core/src/main/java/org/apache/wicket/request/cycle/RequestCycle.java @@ -660,7 +660,9 @@ public class RequestCycle implements IRequestCycle, IEventSink { if (page instanceof Page) { - ((Page)page).setStatelessHint(false); + Page _page = (Page) page; + _page.setStatelessHint(false); + _page.internalInitialize(); } scheduleRequestHandlerAfterCurrent(new RenderPageRequestHandler(new PageProvider(page), RenderPageRequestHandler.RedirectPolicy.AUTO_REDIRECT));