From 38bfea7cfa409dfe0864a5f42fb528007499999d Mon Sep 17 00:00:00 2001 From: Leif Åstrand Date: Mon, 8 Oct 2012 17:07:25 +0300 Subject: Remove CombinedRequest and BrowserDetails (#8165) * Primary use case for CombinedRequest (special path and parameters) already elimiated by other changes * BrowserDetails.getLocation is now available through Page * BrowserDetails.getWindowName only used internally in one location * VaadinServletRequest.cast and similar for portlets removed now that a normal cast can always be used as there's no CombinedRequest to consider Change-Id: I44f28722a12f86015b3c30e83768e4611b87479c --- uitest/src/com/vaadin/launcher/ApplicationRunnerServlet.java | 3 +-- uitest/src/com/vaadin/tests/application/RefreshStatePreserve.java | 4 ++-- uitest/src/com/vaadin/tests/components/ui/LazyInitUIs.java | 3 ++- .../minitutorials/v7a1/DifferentFeaturesForDifferentClients.java | 2 +- uitest/src/com/vaadin/tests/minitutorials/v7a1/UsingUriFragments.java | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) (limited to 'uitest/src/com') diff --git a/uitest/src/com/vaadin/launcher/ApplicationRunnerServlet.java b/uitest/src/com/vaadin/launcher/ApplicationRunnerServlet.java index 0c2a1f965a..37f74471d2 100644 --- a/uitest/src/com/vaadin/launcher/ApplicationRunnerServlet.java +++ b/uitest/src/com/vaadin/launcher/ApplicationRunnerServlet.java @@ -162,8 +162,7 @@ public class ApplicationRunnerServlet extends LegacyVaadinServlet { throw new ServiceException( new InstantiationException( "Failed to load application class: " - + getApplicationRunnerApplicationClassName(VaadinServletRequest - .cast(request)))); + + getApplicationRunnerApplicationClassName((VaadinServletRequest) request))); } } diff --git a/uitest/src/com/vaadin/tests/application/RefreshStatePreserve.java b/uitest/src/com/vaadin/tests/application/RefreshStatePreserve.java index 5e406a5c98..c99e384f81 100644 --- a/uitest/src/com/vaadin/tests/application/RefreshStatePreserve.java +++ b/uitest/src/com/vaadin/tests/application/RefreshStatePreserve.java @@ -10,8 +10,8 @@ public class RefreshStatePreserve extends AbstractTestUI { @Override protected void setup(VaadinRequest request) { - addComponent(new Label("window.name: " - + request.getBrowserDetails().getWindowName())); + // Internal parameter sent by vaadinBootstrap.js, + addComponent(new Label("window.name: " + request.getParameter("wn"))); addComponent(new Label("UI id: " + getUIId())); } diff --git a/uitest/src/com/vaadin/tests/components/ui/LazyInitUIs.java b/uitest/src/com/vaadin/tests/components/ui/LazyInitUIs.java index e1fae91a3c..1064f2e766 100644 --- a/uitest/src/com/vaadin/tests/components/ui/LazyInitUIs.java +++ b/uitest/src/com/vaadin/tests/components/ui/LazyInitUIs.java @@ -1,6 +1,7 @@ package com.vaadin.tests.components.ui; import com.vaadin.server.ExternalResource; +import com.vaadin.server.Page; import com.vaadin.server.UIClassSelectionEvent; import com.vaadin.server.UICreateEvent; import com.vaadin.server.UIProviderEvent; @@ -76,7 +77,7 @@ public class LazyInitUIs extends AbstractTestUIProvider { info += "
pathInfo: " + request.getRequestPathInfo(); info += "
parameters: " + request.getParameterMap().keySet(); info += "
uri fragment: " - + request.getBrowserDetails().getLocation().getFragment(); + + Page.getCurrent().getLocation().getFragment(); return new Label(info, ContentMode.HTML); } diff --git a/uitest/src/com/vaadin/tests/minitutorials/v7a1/DifferentFeaturesForDifferentClients.java b/uitest/src/com/vaadin/tests/minitutorials/v7a1/DifferentFeaturesForDifferentClients.java index ad3a30d4ca..737de10894 100644 --- a/uitest/src/com/vaadin/tests/minitutorials/v7a1/DifferentFeaturesForDifferentClients.java +++ b/uitest/src/com/vaadin/tests/minitutorials/v7a1/DifferentFeaturesForDifferentClients.java @@ -67,7 +67,7 @@ class DefaultRoot extends UI { class TouchRoot extends UI { @Override protected void init(VaadinRequest request) { - WebBrowser webBrowser = request.getBrowserDetails().getWebBrowser(); + WebBrowser webBrowser = getSession().getBrowser(); String screenSize = "" + webBrowser.getScreenWidth() + "x" + webBrowser.getScreenHeight(); getContent().addComponent( diff --git a/uitest/src/com/vaadin/tests/minitutorials/v7a1/UsingUriFragments.java b/uitest/src/com/vaadin/tests/minitutorials/v7a1/UsingUriFragments.java index db8b261628..6d9890a21c 100644 --- a/uitest/src/com/vaadin/tests/minitutorials/v7a1/UsingUriFragments.java +++ b/uitest/src/com/vaadin/tests/minitutorials/v7a1/UsingUriFragments.java @@ -36,7 +36,7 @@ public class UsingUriFragments extends UI { @Override protected void init(VaadinRequest request) { Label label = new Label("Hello, your fragment is " - + request.getBrowserDetails().getLocation().getFragment()); + + getPage().getLocation().getFragment()); getContent().addComponent(label); // React to fragment changes @@ -48,7 +48,7 @@ public class UsingUriFragments extends UI { }); // Handle the fragment received in the initial request - handleFragment(request.getBrowserDetails().getLocation().getFragment()); + handleFragment(getPage().getLocation().getFragment()); addComponent(new Button("Show and set fragment", new Button.ClickListener() { -- cgit v1.2.3