summaryrefslogtreecommitdiffstats
path: root/uitest
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2012-09-21 13:21:18 +0300
committerLeif Åstrand <leif@vaadin.com>2012-09-21 13:21:31 +0300
commit474b7dbcc7abe07f2f16cd200f48723a471926c4 (patch)
tree2ad450370f44259da0292a42921e9dbe8298b7dc /uitest
parentfedfc550e2beb5f996cfd4f78c14618b6a294315 (diff)
downloadvaadin-framework-474b7dbcc7abe07f2f16cd200f48723a471926c4.tar.gz
vaadin-framework-474b7dbcc7abe07f2f16cd200f48723a471926c4.zip
Refactor UIProvider management and fix multi-servlet (#9619, #9637)
Diffstat (limited to 'uitest')
-rw-r--r--uitest/src/com/vaadin/launcher/ApplicationRunnerServlet.java22
1 files changed, 12 insertions, 10 deletions
diff --git a/uitest/src/com/vaadin/launcher/ApplicationRunnerServlet.java b/uitest/src/com/vaadin/launcher/ApplicationRunnerServlet.java
index 1323e247d9..971102495d 100644
--- a/uitest/src/com/vaadin/launcher/ApplicationRunnerServlet.java
+++ b/uitest/src/com/vaadin/launcher/ApplicationRunnerServlet.java
@@ -35,11 +35,11 @@ import com.vaadin.server.DeploymentConfiguration;
import com.vaadin.server.LegacyVaadinServlet;
import com.vaadin.server.ServiceException;
import com.vaadin.server.UIProvider;
+import com.vaadin.server.VaadinRequest;
+import com.vaadin.server.VaadinServletRequest;
import com.vaadin.server.VaadinSession;
import com.vaadin.server.VaadinSessionInitializationListener;
import com.vaadin.server.VaadinSessionInitializeEvent;
-import com.vaadin.server.VaadinServletRequest;
-import com.vaadin.server.VaadinRequest;
import com.vaadin.tests.components.TestBase;
import com.vaadin.ui.UI;
@@ -143,17 +143,19 @@ public class ApplicationRunnerServlet extends LegacyVaadinServlet {
try {
final Class<?> classToRun = getClassToRun();
if (UI.class.isAssignableFrom(classToRun)) {
- session.addUIProvider(new AbstractUIProvider() {
-
- @Override
- public Class<? extends UI> getUIClass(VaadinRequest request) {
- return (Class<? extends UI>) classToRun;
- }
- });
+ getVaadinService().addUIProvider(session,
+ new AbstractUIProvider() {
+ @Override
+ public Class<? extends UI> getUIClass(
+ VaadinRequest request) {
+ return (Class<? extends UI>) classToRun;
+ }
+ });
} else if (LegacyApplication.class.isAssignableFrom(classToRun)) {
// Avoid using own UIProvider for legacy Application
} else if (UIProvider.class.isAssignableFrom(classToRun)) {
- session.addUIProvider((UIProvider) classToRun.newInstance());
+ getVaadinService().addUIProvider(session,
+ (UIProvider) classToRun.newInstance());
} else {
throw new ServiceException(classToRun.getCanonicalName()
+ " is neither an Application nor a UI");