You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by mg...@apache.org on 2014/04/22 11:05:33 UTC
git commit: WICKET-5563 RestartResponseAtInterceptPageException - add
public function to retrieve originalUrl
Repository: wicket
Updated Branches:
refs/heads/wicket-6.x dff86ea5c -> 4a6cfb90b
WICKET-5563 RestartResponseAtInterceptPageException - add public function to retrieve originalUrl
Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/4a6cfb90
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/4a6cfb90
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/4a6cfb90
Branch: refs/heads/wicket-6.x
Commit: 4a6cfb90b0671b669e631a06240e5ef4d8c995ea
Parents: dff86ea
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
Authored: Tue Apr 22 12:05:02 2014 +0300
Committer: Martin Tzvetanov Grigorov <mg...@apache.org>
Committed: Tue Apr 22 12:05:02 2014 +0300
----------------------------------------------------------------------
...RestartResponseAtInterceptPageException.java | 30 ++++++++++++++++++++
1 file changed, 30 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/wicket/blob/4a6cfb90/wicket-core/src/main/java/org/apache/wicket/RestartResponseAtInterceptPageException.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/RestartResponseAtInterceptPageException.java b/wicket-core/src/main/java/org/apache/wicket/RestartResponseAtInterceptPageException.java
index 431dc5b..da8b244 100644
--- a/wicket-core/src/main/java/org/apache/wicket/RestartResponseAtInterceptPageException.java
+++ b/wicket-core/src/main/java/org/apache/wicket/RestartResponseAtInterceptPageException.java
@@ -84,6 +84,36 @@ public class RestartResponseAtInterceptPageException extends ResetResponseExcept
}
/**
+ * @return the url of the request when the interception happened or {@code null}
+ * or {@code null} if there was no interception yet
+ */
+ public static Url getOriginalUrl()
+ {
+ Url originalUrl = null;
+ InterceptData data = InterceptData.get();
+ if (data != null)
+ {
+ originalUrl = data.getOriginalUrl();
+ }
+ return originalUrl;
+ }
+
+ /**
+ * @return the post parameters of thе request when the interception happened
+ * or {@code null} if there was no interception yet
+ */
+ public static Map<String, List<StringValue>> getOriginalPostParameters()
+ {
+ Map<String, List<StringValue>> postParameters = null;
+ InterceptData data = InterceptData.get();
+ if (data != null)
+ {
+ postParameters = data.getPostParameters();
+ }
+ return postParameters;
+ }
+
+ /**
* INTERNAL CLASS, DO NOT USE
*
* @author igor.vaynberg