summaryrefslogtreecommitdiffstats
path: root/uitest/src/com/vaadin/tests/application/RefreshStatePreserve.java
diff options
context:
space:
mode:
Diffstat (limited to 'uitest/src/com/vaadin/tests/application/RefreshStatePreserve.java')
-rw-r--r--uitest/src/com/vaadin/tests/application/RefreshStatePreserve.java31
1 files changed, 7 insertions, 24 deletions
diff --git a/uitest/src/com/vaadin/tests/application/RefreshStatePreserve.java b/uitest/src/com/vaadin/tests/application/RefreshStatePreserve.java
index 8962f5de9a..13ceceab6c 100644
--- a/uitest/src/com/vaadin/tests/application/RefreshStatePreserve.java
+++ b/uitest/src/com/vaadin/tests/application/RefreshStatePreserve.java
@@ -1,35 +1,18 @@
package com.vaadin.tests.application;
-import com.vaadin.Application;
import com.vaadin.annotations.PreserveOnRefresh;
-import com.vaadin.server.AbstractUIProvider;
import com.vaadin.server.WrappedRequest;
-import com.vaadin.tests.components.AbstractTestApplication;
+import com.vaadin.tests.components.AbstractTestUI;
import com.vaadin.ui.Label;
-import com.vaadin.ui.UI;
-public class RefreshStatePreserve extends AbstractTestApplication {
- @PreserveOnRefresh
- public static class RefreshStateUI extends UI {
- @Override
- public void init(WrappedRequest request) {
- getContent().addComponent(
- new Label("window.name: "
- + request.getBrowserDetails().getWindowName()));
- getContent().addComponent(new Label("UI id: " + getUIId()));
- }
- }
+@PreserveOnRefresh
+public class RefreshStatePreserve extends AbstractTestUI {
@Override
- public void init() {
- super.init();
- addUIProvider(new AbstractUIProvider() {
- @Override
- public Class<? extends UI> getUIClass(Application application,
- WrappedRequest request) {
- return RefreshStateUI.class;
- }
- });
+ protected void setup(WrappedRequest request) {
+ addComponent(new Label("window.name: "
+ + request.getBrowserDetails().getWindowName()));
+ addComponent(new Label("UI id: " + getUIId()));
}
@Override