You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by iv...@apache.org on 2010/10/18 23:06:13 UTC
svn commit: r1024004 - in /wicket/trunk:
wicket-examples/src/main/java/org/apache/wicket/examples/niceurl/
wicket-jmx/src/main/java/org/apache/wicket/jmx/
wicket/src/main/java/org/apache/wicket/markup/html/
wicket/src/main/java/org/apache/wicket/settings/
Author: ivaynberg
Date: Mon Oct 18 21:06:13 2010
New Revision: 1024004
URL: http://svn.apache.org/viewvc?rev=1024004&view=rev
Log:
remove left overs of obsolted auto multi window support from 1.4.x
Removed:
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/INewBrowserWindowListener.java
Modified:
wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/niceurl/NiceUrlApplication.java
wicket/trunk/wicket-jmx/src/main/java/org/apache/wicket/jmx/PageSettings.java
wicket/trunk/wicket-jmx/src/main/java/org/apache/wicket/jmx/PageSettingsMBean.java
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/WebPage.java
wicket/trunk/wicket/src/main/java/org/apache/wicket/settings/IPageSettings.java
wicket/trunk/wicket/src/main/java/org/apache/wicket/settings/Settings.java
Modified: wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/niceurl/NiceUrlApplication.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/niceurl/NiceUrlApplication.java?rev=1024004&r1=1024003&r2=1024004&view=diff
==============================================================================
--- wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/niceurl/NiceUrlApplication.java (original)
+++ wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/niceurl/NiceUrlApplication.java Mon Oct 18 21:06:13 2010
@@ -62,10 +62,6 @@ public class NiceUrlApplication extends
{
super.init();
- // Disable creation of javascript which jWebUnit (test only)
- // doesn't handle properly
- getPageSettings().setAutomaticMultiWindowSupport(false);
-
// mount single bookmarkable pages
mountPage("/the/homepage/path", Home.class);
mountPage("/a/nice/path/to/the/first/page", Page1.class);
Modified: wicket/trunk/wicket-jmx/src/main/java/org/apache/wicket/jmx/PageSettings.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-jmx/src/main/java/org/apache/wicket/jmx/PageSettings.java?rev=1024004&r1=1024003&r2=1024004&view=diff
==============================================================================
--- wicket/trunk/wicket-jmx/src/main/java/org/apache/wicket/jmx/PageSettings.java (original)
+++ wicket/trunk/wicket-jmx/src/main/java/org/apache/wicket/jmx/PageSettings.java Mon Oct 18 21:06:13 2010
@@ -37,14 +37,6 @@ public class PageSettings implements Pag
}
/**
- * @see org.apache.wicket.jmx.PageSettingsMBean#getAutomaticMultiWindowSupport()
- */
- public boolean getAutomaticMultiWindowSupport()
- {
- return application.getPageSettings().getAutomaticMultiWindowSupport();
- }
-
- /**
* @see org.apache.wicket.jmx.PageSettingsMBean#getVersionPagesByDefault()
*/
public boolean getVersionPagesByDefault()
@@ -53,14 +45,6 @@ public class PageSettings implements Pag
}
/**
- * @see org.apache.wicket.jmx.PageSettingsMBean#setAutomaticMultiWindowSupport(boolean)
- */
- public void setAutomaticMultiWindowSupport(boolean automaticMultiWindowSupport)
- {
- application.getPageSettings().setAutomaticMultiWindowSupport(automaticMultiWindowSupport);
- }
-
- /**
* @see org.apache.wicket.jmx.PageSettingsMBean#setVersionPagesByDefault(boolean)
*/
public void setVersionPagesByDefault(boolean pagesVersionedByDefault)
Modified: wicket/trunk/wicket-jmx/src/main/java/org/apache/wicket/jmx/PageSettingsMBean.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-jmx/src/main/java/org/apache/wicket/jmx/PageSettingsMBean.java?rev=1024004&r1=1024003&r2=1024004&view=diff
==============================================================================
--- wicket/trunk/wicket-jmx/src/main/java/org/apache/wicket/jmx/PageSettingsMBean.java (original)
+++ wicket/trunk/wicket-jmx/src/main/java/org/apache/wicket/jmx/PageSettingsMBean.java Mon Oct 18 21:06:13 2010
@@ -16,7 +16,6 @@
*/
package org.apache.wicket.jmx;
-import org.apache.wicket.markup.html.WebPage;
/**
* Page settings.
@@ -26,48 +25,11 @@ import org.apache.wicket.markup.html.Web
public interface PageSettingsMBean
{
/**
- * Gets whether Wicket should try to support opening multiple windows for the same session
- * transparently. If this is true - the default setting -, Wicket tries to detect whether a new
- * window was opened by a user (e.g. in Internet Explorer by pressing ctrl+n or ctrl+click on a
- * link), and if it detects that, it creates a new page map for that window on the fly. As a
- * page map represents the 'history' of one window, each window will then have their own
- * history. If two windows would share the same page map, the non-bookmarkable links on one
- * window could refer to stale state after working a while in the other window.
- * <p>
- * <strong> Currently, Wicket trying to do this is a best effort that is not completely fail
- * safe. When the client does not support cookies, support gets tricky and incomplete. See
- * {@link WebPage}'s internals for the implementation. </strong>
- * </p>
- *
- * @return Whether Wicket should try to support multiple windows transparently
- */
- boolean getAutomaticMultiWindowSupport();
-
- /**
* @return Returns the pagesVersionedByDefault.
*/
boolean getVersionPagesByDefault();
/**
- * Sets whether Wicket should try to support opening multiple windows for the same session
- * transparently. If this is true - the default setting -, Wicket tries to detect whether a new
- * window was opened by a user (e.g. in Internet Explorer by pressing ctrl+n or ctrl+click on a
- * link), and if it detects that, it creates a new page map for that window on the fly. As a
- * page map represents the 'history' of one window, each window will then have their own
- * history. If two windows would share the same page map, the non-bookmarkable links on one
- * window could refer to stale state after working a while in the other window.
- * <p>
- * <strong> Currently, Wicket trying to do this is a best effort that is not completely fail
- * safe. When the client does not support cookies, support gets tricky and incomplete. See
- * {@link WebPage}'s internals for the implementation. </strong>
- * </p>
- *
- * @param automaticMultiWindowSupport
- * Whether Wicket should try to support multiple windows transparently
- */
- void setAutomaticMultiWindowSupport(boolean automaticMultiWindowSupport);
-
- /**
* @param pagesVersionedByDefault
* The pagesVersionedByDefault to set.
*/
Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/WebPage.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/WebPage.java?rev=1024004&r1=1024003&r2=1024004&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/WebPage.java (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/WebPage.java Mon Oct 18 21:06:13 2010
@@ -19,13 +19,11 @@ package org.apache.wicket.markup.html;
import org.apache.wicket.Application;
import org.apache.wicket.Component;
import org.apache.wicket.Page;
-import org.apache.wicket.behavior.AbstractBehavior;
import org.apache.wicket.markup.MarkupType;
import org.apache.wicket.markup.html.internal.HtmlHeaderContainer;
import org.apache.wicket.markup.html.link.BookmarkablePageLink;
import org.apache.wicket.markup.parser.filter.HtmlHeaderSectionHandler;
import org.apache.wicket.model.IModel;
-import org.apache.wicket.protocol.http.RequestUtils;
import org.apache.wicket.request.IRequestHandler;
import org.apache.wicket.request.Response;
import org.apache.wicket.request.handler.IPageRequestHandler;
@@ -52,54 +50,19 @@ import org.slf4j.LoggerFactory;
* a no-arg constructor or with a constructor that accepts a PageParameters argument (which wraps
* any query string parameters for a request). In case the page has both constructors, the
* constructor with PageParameters will be used.
- *
+ *
* @author Jonathan Locke
* @author Eelco Hillenius
* @author Juergen Donnerstag
* @author Gwyn Evans
*/
-public class WebPage extends Page implements INewBrowserWindowListener
+public class WebPage extends Page
{
/** log. */
private static final Logger log = LoggerFactory.getLogger(WebPage.class);
private static final long serialVersionUID = 1L;
- /**
- * Tries to determine whether this page was opened in a new window or tab. If it is (and this
- * checker were able to recognize that), a new page map is created for this page instance, so
- * that it will start using it's own history in sync with the browser window or tab.
- */
- private static final class PageMapChecker extends AbstractBehavior
- implements
- IHeaderContributor
- {
- private static final long serialVersionUID = 1L;
-
- private final WebPage webPage;
-
- /**
- * Construct.
- *
- * @param webPage
- */
- PageMapChecker(WebPage webPage)
- {
- this.webPage = webPage;
- }
-
- /**
- * @see org.apache.wicket.markup.html.IHeaderContributor#renderHead(IHeaderResponse)
- */
- public final void renderHead(final IHeaderResponse headResponse)
- {
- // TODO
- // this is the place where page checked for current pagemap name and cloned itself when
- // opened in new tab.
- // This will have to be done differently - as implementation detail of PageManager
- }
- }
-
/** The resource references used for new window/tab support */
private static ResourceReference cookiesResource = new PackageResourceReference(WebPage.class,
"cookies.js");
@@ -130,10 +93,10 @@ public class WebPage extends Page implem
* 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 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.
*/
@@ -148,7 +111,7 @@ public class WebPage extends Page implem
* markup language, such as VXML, would require the creation of a different Page subclass in an
* appropriate package under org.apache.wicket.markup. To support VXML (voice markup), one might
* create the package org.apache.wicket.markup.vxml and a subclass of Page called VoicePage.
- *
+ *
* @return Markup type for HTML
*/
@Override
@@ -158,23 +121,11 @@ public class WebPage extends Page implem
}
/**
- * @see org.apache.wicket.markup.html.INewBrowserWindowListener#onNewBrowserWindow()
- */
- public void onNewBrowserWindow()
- {
- // TODO: Needs to be implementation detail of PageManager
- }
-
- /**
* Common code executed by constructors.
*/
private void commonInit()
{
- // if automatic multi window support is on, add a page checker instance
- if (getApplication().getPageSettings().getAutomaticMultiWindowSupport())
- {
- add(new PageMapChecker(this));
- }
+ // so far a noop
}
/**
@@ -193,19 +144,19 @@ public class WebPage extends Page implem
}
/**
- * Subclasses can override this to set there headers when the Page is being served.
- * By default these headers are set:
- *
+ * Subclasses can override this to set there headers when the Page is being served. By default
+ * these headers are set:
+ *
* <pre>
* response.setHeader("Date", "[now]");
* response.setHeader("Expires", "[0]");
* response.setHeader("Pragma", "no-cache");
* response.setHeader("Cache-Control", "no-cache");
* </pre>
- *
+ *
* So if a Page wants to control this or doesn't want to set this info it should override this
* method and don't call super.
- *
+ *
* @param response
* The WebResponse where set(Date)Header can be called on.
*/
@@ -215,7 +166,7 @@ public class WebPage extends Page implem
}
/**
- *
+ *
* @see org.apache.wicket.Component#onAfterRender()
*/
@Override
@@ -319,7 +270,7 @@ public class WebPage extends Page implem
/**
* Creates and returns a bookmarkable link to this application's home page.
- *
+ *
* @param id
* Name of link
* @return Link to home page for this application
Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/settings/IPageSettings.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/settings/IPageSettings.java?rev=1024004&r1=1024003&r2=1024004&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/settings/IPageSettings.java (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/settings/IPageSettings.java Mon Oct 18 21:06:13 2010
@@ -18,8 +18,6 @@ package org.apache.wicket.settings;
import java.util.List;
-import org.apache.wicket.Application;
-import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.markup.resolver.AutoComponentResolver;
import org.apache.wicket.markup.resolver.IComponentResolver;
@@ -49,24 +47,6 @@ public interface IPageSettings
List<IComponentResolver> getComponentResolvers();
/**
- * Gets whether Wicket should try to support opening multiple windows for the same session
- * transparently. If this is true - the default setting -, Wicket tries to detect whether a new
- * window was opened by a user (e.g. in Internet Explorer by pressing ctrl+n or ctrl+click on a
- * link), and if it detects that, it creates a new page map for that window on the fly. As a
- * page map represents the 'history' of one window, each window will then have their own
- * history. If two windows would share the same page map, the non-bookmarkable links on one
- * window could refer to stale state after working a while in the other window.
- * <p>
- * <strong> Currently, Wicket trying to do this is a best effort that is not completely fail
- * safe. When the client does not support cookies, support gets tricky and incomplete. See
- * {@link WebPage}'s internals for the implementation. </strong>
- * </p>
- *
- * @return Whether Wicket should try to support multiple windows transparently
- */
- boolean getAutomaticMultiWindowSupport();
-
- /**
* @return Returns the pagesVersionedByDefault.
*/
boolean getVersionPagesByDefault();
@@ -77,28 +57,4 @@ public interface IPageSettings
*/
void setVersionPagesByDefault(boolean pagesVersionedByDefault);
- /**
- * Sets whether Wicket should try to support opening multiple windows for the same session
- * transparently. If this is true - the default setting -, Wicket tries to detect whether a new
- * window was opened by a user (e.g. in Internet Explorer by pressing ctrl+n or ctrl+click on a
- * link), and if it detects that, it creates a new page map for that window on the fly. As a
- * page map represents the 'history' of one window, each window will then have their own
- * history. If two windows would share the same page map, the non-bookmarkable links on one
- * window could refer to stale state after working a while in the other window.
- * <p>
- * <strong> Currently, Wicket trying to do this is a best effort that is not completely fail
- * safe. When the client does not support cookies, support gets tricky and incomplete. See
- * {@link WebPage}'s internals for the implementation. </strong>
- * </p>
- *
- * NOTE:
- *
- * When Wicket is used with {@link SecondLevelCacheSessionStore}, this store may disable this
- * feature. See the javadoc of the second level store for details. This feature can be reenabled
- * by calling this method from {@link Application#init}
- *
- * @param automaticMultiWindowSupport
- * Whether Wicket should try to support multiple windows transparently
- */
- void setAutomaticMultiWindowSupport(boolean automaticMultiWindowSupport);
}
\ No newline at end of file
Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/settings/Settings.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/settings/Settings.java?rev=1024004&r1=1024003&r2=1024004&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/settings/Settings.java (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/settings/Settings.java Mon Oct 18 21:06:13 2010
@@ -427,14 +427,6 @@ public final class Settings
}
/**
- * @see org.apache.wicket.settings.IPageSettings#getAutomaticMultiWindowSupport()
- */
- public boolean getAutomaticMultiWindowSupport()
- {
- return automaticMultiWindowSupport;
- }
-
- /**
* @see org.apache.wicket.settings.IRequestCycleSettings#getBufferResponse()
*/
public boolean getBufferResponse()
@@ -832,14 +824,6 @@ public final class Settings
}
/**
- * @see org.apache.wicket.settings.IPageSettings#setAutomaticMultiWindowSupport(boolean)
- */
- public void setAutomaticMultiWindowSupport(boolean automaticMultiWindowSupport)
- {
- this.automaticMultiWindowSupport = automaticMultiWindowSupport;
- }
-
- /**
* @see org.apache.wicket.settings.IRequestCycleSettings#setBufferResponse(boolean)
*/
public void setBufferResponse(boolean bufferResponse)