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/08/12 09:55:26 UTC

[1/3] git commit: WICKET-5539 Incorrect recreation of page in case of PageExpire

Repository: wicket
Updated Branches:
  refs/heads/wicket-6.x 1c2661a6b -> f7e47502f


WICKET-5539 Incorrect recreation of page in case of PageExpire

Make it possible for custom MountedMappers to use the parsed PageParameters while processing a listener interface

This is a temporary workaround for Wicket 6.x. It is done in a better/configurable way in Wicket 7.x with https://git-wip-us.apache.org/repos/asf?p=wicket.git;a=commit;h=a1f862629c223b675a31c4ba9fb7e07c27279090


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/46b9ed39
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/46b9ed39
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/46b9ed39

Branch: refs/heads/wicket-6.x
Commit: 46b9ed395b562a82880ffcc6e6cfc1f01e8b172d
Parents: ca4711f
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
Authored: Mon Aug 11 13:33:40 2014 +0200
Committer: Martin Tzvetanov Grigorov <mg...@apache.org>
Committed: Mon Aug 11 13:33:40 2014 +0200

----------------------------------------------------------------------
 .../mapper/AbstractBookmarkableMapper.java      | 26 ++++++++++++++++----
 1 file changed, 21 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/46b9ed39/wicket-core/src/main/java/org/apache/wicket/core/request/mapper/AbstractBookmarkableMapper.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/core/request/mapper/AbstractBookmarkableMapper.java b/wicket-core/src/main/java/org/apache/wicket/core/request/mapper/AbstractBookmarkableMapper.java
index a9433c7..0e2084d 100644
--- a/wicket-core/src/main/java/org/apache/wicket/core/request/mapper/AbstractBookmarkableMapper.java
+++ b/wicket-core/src/main/java/org/apache/wicket/core/request/mapper/AbstractBookmarkableMapper.java
@@ -250,11 +250,7 @@ public abstract class AbstractBookmarkableMapper extends AbstractComponentMapper
 
 		if (listenerInterface != null)
 		{
-			if (pageInfo.getPageId() != null)
-			{
-				// WICKET-4594 - ignore the parsed parameters for stateful pages
-				pageParameters = null;
-			}
+			pageParameters = getPageParametersForListener(pageInfo, pageParameters);
 
 			PageAndComponentProvider provider = new PageAndComponentProvider(pageInfo.getPageId(),
 				pageClass, pageParameters, renderCount, componentInfo.getComponentPath());
@@ -284,6 +280,26 @@ public abstract class AbstractBookmarkableMapper extends AbstractComponentMapper
 	}
 
 	/**
+	 * Returns the PageParameters which should be used while processing a listener interface
+	 *
+	 * @param pageInfo
+	 *          The parsed page info
+	 * @param pageParameters
+	 *          The parsed request parameters
+	 * @return {@code null} for stateful page and the given pageParameters for stateless pages
+	 */
+	// WICKET-5539
+	protected PageParameters getPageParametersForListener(PageInfo pageInfo, PageParameters pageParameters)
+	{
+		if (pageInfo.getPageId() != null)
+		{
+			// WICKET-4594 - ignore the parsed parameters for stateful pages
+			return null;
+		}
+		return pageParameters;
+	}
+
+	/**
 	 * @see org.apache.wicket.request.IRequestMapper#mapRequest(org.apache.wicket.request.Request)
 	 */
 	@Override


[2/3] git commit: WICKET-5539 Allow preserving of the parsed PageParameters when re-creating an expired page

Posted by mg...@apache.org.
WICKET-5539 Allow preserving of the parsed PageParameters when re-creating an expired page

Remove 'final' modifier for all mount related methods in WebApplication


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/f6eaa937
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/f6eaa937
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/f6eaa937

Branch: refs/heads/wicket-6.x
Commit: f6eaa937d4cdda9fd04c3c5312eaca66d5fb52a2
Parents: 46b9ed3
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
Authored: Tue Aug 12 09:53:07 2014 +0200
Committer: Martin Tzvetanov Grigorov <mg...@apache.org>
Committed: Tue Aug 12 09:53:07 2014 +0200

----------------------------------------------------------------------
 .../org/apache/wicket/protocol/http/WebApplication.java   | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/f6eaa937/wicket-core/src/main/java/org/apache/wicket/protocol/http/WebApplication.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/protocol/http/WebApplication.java b/wicket-core/src/main/java/org/apache/wicket/protocol/http/WebApplication.java
index 1123e8a..3ad89e9 100644
--- a/wicket-core/src/main/java/org/apache/wicket/protocol/http/WebApplication.java
+++ b/wicket-core/src/main/java/org/apache/wicket/protocol/http/WebApplication.java
@@ -315,7 +315,7 @@ public abstract class WebApplication extends Application
 	 * @param mapper
 	 *            the encoder that will be used for this mount
 	 */
-	public final void mount(final IRequestMapper mapper)
+	public void mount(final IRequestMapper mapper)
 	{
 		Args.notNull(mapper, "mapper");
 		getRootRequestMapperAsCompound().add(mapper);
@@ -332,7 +332,7 @@ public abstract class WebApplication extends Application
 	 * @param pageClass
 	 *            the page class to be mounted
 	 */
-	public final <T extends Page> void mountPage(final String path, final Class<T> pageClass)
+	public <T extends Page> void mountPage(final String path, final Class<T> pageClass)
 	{
 		mount(new MountedMapper(path, pageClass));
 	}
@@ -345,7 +345,7 @@ public abstract class WebApplication extends Application
 	 * @param reference
 	 *            resource reference to be mounted
 	 */
-	public final void mountResource(final String path, final ResourceReference reference)
+	public void mountResource(final String path, final ResourceReference reference)
 	{
 		if (reference.canBeRegistered())
 		{
@@ -365,7 +365,7 @@ public abstract class WebApplication extends Application
 	 * @param pageClass
 	 *            the page class to be mounted
 	 */
-	public final <P extends Page> void mountPackage(final String path, final Class<P> pageClass)
+	public <P extends Page> void mountPackage(final String path, final Class<P> pageClass)
 	{
 		PackageMapper packageMapper = new PackageMapper(PackageName.forClass(pageClass));
 		MountMapper mountMapper = new MountMapper(path, packageMapper);
@@ -381,7 +381,7 @@ public abstract class WebApplication extends Application
 	 * @param path
 	 *            the path to unmount
 	 */
-	public final void unmount(String path)
+	public void unmount(String path)
 	{
 		Args.notNull(path, "path");
 


[3/3] git commit: Merge branch '5539-hook-for-listener-parameters' into wicket-6.x

Posted by mg...@apache.org.
Merge branch '5539-hook-for-listener-parameters' into wicket-6.x


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/f7e47502
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/f7e47502
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/f7e47502

Branch: refs/heads/wicket-6.x
Commit: f7e47502fb3d4c8db50b6a1f392e9ec91a60af0b
Parents: 1c2661a f6eaa93
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
Authored: Tue Aug 12 09:55:16 2014 +0200
Committer: Martin Tzvetanov Grigorov <mg...@apache.org>
Committed: Tue Aug 12 09:55:16 2014 +0200

----------------------------------------------------------------------
 .../mapper/AbstractBookmarkableMapper.java      | 26 ++++++++++++++++----
 .../wicket/protocol/http/WebApplication.java    | 10 ++++----
 2 files changed, 26 insertions(+), 10 deletions(-)
----------------------------------------------------------------------