You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by jc...@apache.org on 2007/10/31 14:41:12 UTC

svn commit: r590670 - /wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/WebPage.java

Author: jcompagner
Date: Wed Oct 31 06:41:12 2007
New Revision: 590670

URL: http://svn.apache.org/viewvc?rev=590670&view=rev
Log:
added the extra constructor with the PageMap and PageParams.
Improved the doc so that it is known that you have to pass the PageParams if you want to remember them for stateless urls

Modified:
    wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/WebPage.java

Modified: wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/WebPage.java
URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/WebPage.java?rev=590670&r1=590669&r2=590670&view=diff
==============================================================================
--- wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/WebPage.java (original)
+++ wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/WebPage.java Wed Oct 31 06:41:12 2007
@@ -222,12 +222,38 @@
 	 * that tools such as IDEs will include it their list of suggested constructors for derived
 	 * classes.
 	 * 
+	 * Please call this constructor (or the one with the pagemap) if you want to remember the
+	 * pageparameters {@link #getPageParameters()}. So that they are reused for stateless links.
+	 * 
 	 * @param parameters
 	 *            Wrapped query string parameters.
 	 */
 	protected WebPage(final PageParameters parameters)
 	{
 		super(parameters);
+		commonInit();
+	}
+
+	/**
+	 * Constructor which receives wrapped query string parameters for a request. Having this
+	 * constructor public means that your page is 'bookmarkable' and hence can be called/ created
+	 * from anywhere. For bookmarkable pages (as opposed to when you construct page instances
+	 * yourself, this constructor will be used in preference to a no-arg constructor, if both exist.
+	 * Note that nothing is done with the page parameters argument. This constructor is provided so
+	 * that tools such as IDEs will include it their list of suggested constructors for derived
+	 * classes.
+	 * 
+	 * Please call this constructor (or the one without the pagemap) if you want to remember the
+	 * pageparameters {@link #getPageParameters()}. So that they are reused for stateless links.
+	 * 
+	 * @param pageMap
+	 *            The pagemap where the webpage needs to be constructed in.
+	 * @param parameters
+	 *            Wrapped query string parameters.
+	 */
+	protected WebPage(final IPageMap pageMap, final PageParameters parameters)
+	{
+		super(pageMap, parameters);
 		commonInit();
 	}