aboutsummaryrefslogtreecommitdiffstats
path: root/uitest/src/com/vaadin/tests/tickets/Ticket1975.java
diff options
context:
space:
mode:
Diffstat (limited to 'uitest/src/com/vaadin/tests/tickets/Ticket1975.java')
-rw-r--r--uitest/src/com/vaadin/tests/tickets/Ticket1975.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/uitest/src/com/vaadin/tests/tickets/Ticket1975.java b/uitest/src/com/vaadin/tests/tickets/Ticket1975.java
index e85fe294f2..4fa3470f0b 100644
--- a/uitest/src/com/vaadin/tests/tickets/Ticket1975.java
+++ b/uitest/src/com/vaadin/tests/tickets/Ticket1975.java
@@ -5,13 +5,14 @@ import java.io.File;
import java.io.FileInputStream;
import com.vaadin.Application;
-import com.vaadin.server.ServletApplicationContext;
+import com.vaadin.server.WrappedRequest;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.Button.ClickListener;
import com.vaadin.ui.CustomLayout;
import com.vaadin.ui.GridLayout;
import com.vaadin.ui.UI.LegacyWindow;
+import com.vaadin.util.CurrentInstance;
public class Ticket1975 extends Application.LegacyApplication {
@@ -33,7 +34,6 @@ public class Ticket1975 extends Application.LegacyApplication {
try {
cl1 = new CustomLayout(new ByteArrayInputStream(s.getBytes()));
layout.addComponent(cl1);
- ServletApplicationContext wc = ((ServletApplicationContext) getContext());
layout.addComponent(new Button("Disable/Enable",
new ClickListener() {
@@ -47,8 +47,10 @@ public class Ticket1975 extends Application.LegacyApplication {
}
}));
- File f = new File(wc.getBaseDirectory().getAbsoluteFile()
- + "/VAADIN/themes/" + getTheme()
+ File baseDir = CurrentInstance.get(WrappedRequest.class)
+ .getDeploymentConfiguration().getBaseDirectory()
+ .getAbsoluteFile();
+ File f = new File(baseDir + "/VAADIN/themes/" + getTheme()
+ "/layouts/Ticket1975.html");
cl2 = new CustomLayout(new FileInputStream(f));