diff options
author | Leif Åstrand <leif@vaadin.com> | 2012-09-04 16:59:24 +0300 |
---|---|---|
committer | Leif Åstrand <leif@vaadin.com> | 2012-09-05 11:39:35 +0300 |
commit | b0b1a13247bf931eb7f33ff6d0a88fc1833144e9 (patch) | |
tree | b00c4174fd4a9f2b0d77d45d835e4cc60469f994 /uitest/src/com/vaadin/tests/tickets | |
parent | c71563c8a6e9993cbbdff3ddfdfccfee4aa34f7b (diff) | |
download | vaadin-framework-b0b1a13247bf931eb7f33ff6d0a88fc1833144e9.tar.gz vaadin-framework-b0b1a13247bf931eb7f33ff6d0a88fc1833144e9.zip |
Move getBaseDirectory() to DeploymentConfiguration (#9402)
Diffstat (limited to 'uitest/src/com/vaadin/tests/tickets')
-rw-r--r-- | uitest/src/com/vaadin/tests/tickets/Ticket1975.java | 10 |
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)); |