aboutsummaryrefslogtreecommitdiffstats
path: root/uitest/src/com/vaadin
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2012-09-05 19:30:41 +0300
committerLeif Åstrand <leif@vaadin.com>2012-09-05 19:30:41 +0300
commitcc3ddcac953a087b09ae330ff37126dcd5ec727f (patch)
tree35a0b367042298b212038e9cba0ea7d81e6909c3 /uitest/src/com/vaadin
parentd1c361e251800c6f7d596ddf79ed1c7569196856 (diff)
downloadvaadin-framework-cc3ddcac953a087b09ae330ff37126dcd5ec727f.tar.gz
vaadin-framework-cc3ddcac953a087b09ae330ff37126dcd5ec727f.zip
Remove getApplication() and add getSession() (#9402)
Diffstat (limited to 'uitest/src/com/vaadin')
-rw-r--r--uitest/src/com/vaadin/tests/StressComponentsInTable.java2
-rw-r--r--uitest/src/com/vaadin/tests/TestForUpload.java2
-rw-r--r--uitest/src/com/vaadin/tests/application/ApplicationCloseTest.java2
-rw-r--r--uitest/src/com/vaadin/tests/components/AbstractTestUI.java2
-rw-r--r--uitest/src/com/vaadin/tests/components/table/TableFirstRowFlicker.java4
-rw-r--r--uitest/src/com/vaadin/tests/components/textfield/SelectionAndCursorPosition.java3
-rw-r--r--uitest/src/com/vaadin/tests/layouts/ComplexGLColumnExpansionWithColSpan.java2
-rw-r--r--uitest/src/com/vaadin/tests/minitutorials/v7a1/CustomConverterFactoryUI.java2
-rw-r--r--uitest/src/com/vaadin/tests/minitutorials/v7a1/DynamicImageUI.java4
9 files changed, 12 insertions, 11 deletions
diff --git a/uitest/src/com/vaadin/tests/StressComponentsInTable.java b/uitest/src/com/vaadin/tests/StressComponentsInTable.java
index 7c4cca2b0b..fa0b98b1b1 100644
--- a/uitest/src/com/vaadin/tests/StressComponentsInTable.java
+++ b/uitest/src/com/vaadin/tests/StressComponentsInTable.java
@@ -54,7 +54,7 @@ public class StressComponentsInTable extends CustomComponent {
Button b = event.getButton();
System.out.println(b.getCaption() + " click: "
+ (new Date()).toString());
- System.out.println(b.getApplication());
+ System.out.println(b.getUI().getSession());
}
}));
diff --git a/uitest/src/com/vaadin/tests/TestForUpload.java b/uitest/src/com/vaadin/tests/TestForUpload.java
index b0697d337d..7c2359a404 100644
--- a/uitest/src/com/vaadin/tests/TestForUpload.java
+++ b/uitest/src/com/vaadin/tests/TestForUpload.java
@@ -244,7 +244,7 @@ public class TestForUpload extends CustomComponent implements
@Override
public void buttonClick(ClickEvent event) {
- getApplication().close();
+ getSession().close();
}
});
main.addComponent(restart);
diff --git a/uitest/src/com/vaadin/tests/application/ApplicationCloseTest.java b/uitest/src/com/vaadin/tests/application/ApplicationCloseTest.java
index 7250ba3cfb..8cfed569dc 100644
--- a/uitest/src/com/vaadin/tests/application/ApplicationCloseTest.java
+++ b/uitest/src/com/vaadin/tests/application/ApplicationCloseTest.java
@@ -26,7 +26,7 @@ public class ApplicationCloseTest extends TestBase {
@Override
public void buttonClick(ClickEvent event) {
- event.getButton().getApplication().close();
+ event.getButton().getUI().getSession().close();
}
});
diff --git a/uitest/src/com/vaadin/tests/components/AbstractTestUI.java b/uitest/src/com/vaadin/tests/components/AbstractTestUI.java
index 92ac336df7..210cb2535e 100644
--- a/uitest/src/com/vaadin/tests/components/AbstractTestUI.java
+++ b/uitest/src/com/vaadin/tests/components/AbstractTestUI.java
@@ -54,7 +54,7 @@ public abstract class AbstractTestUI extends UI {
protected abstract Integer getTicketNumber();
protected WebBrowser getBrowser() {
- return getApplication().getBrowser();
+ return getSession().getBrowser();
}
}
diff --git a/uitest/src/com/vaadin/tests/components/table/TableFirstRowFlicker.java b/uitest/src/com/vaadin/tests/components/table/TableFirstRowFlicker.java
index 30b878b7eb..5d36b8381b 100644
--- a/uitest/src/com/vaadin/tests/components/table/TableFirstRowFlicker.java
+++ b/uitest/src/com/vaadin/tests/components/table/TableFirstRowFlicker.java
@@ -5,8 +5,8 @@ import com.vaadin.data.Container;
import com.vaadin.data.util.IndexedContainer;
import com.vaadin.ui.Label;
import com.vaadin.ui.ProgressIndicator;
-import com.vaadin.ui.UI.LegacyWindow;
import com.vaadin.ui.Table;
+import com.vaadin.ui.UI.LegacyWindow;
import com.vaadin.ui.VerticalLayout;
public class TableFirstRowFlicker extends LegacyApplication {
@@ -43,7 +43,7 @@ public class TableFirstRowFlicker extends LegacyApplication {
@Override
public void run() {
while (t != null) {
- synchronized (t.getApplication()) {
+ synchronized (t.getUI().getSession()) {
int firstId = t.getCurrentPageFirstItemIndex();
Object selected = t.getValue();
t.setContainerDataSource(buildContainer());
diff --git a/uitest/src/com/vaadin/tests/components/textfield/SelectionAndCursorPosition.java b/uitest/src/com/vaadin/tests/components/textfield/SelectionAndCursorPosition.java
index f6368f0c78..d63d7ddc66 100644
--- a/uitest/src/com/vaadin/tests/components/textfield/SelectionAndCursorPosition.java
+++ b/uitest/src/com/vaadin/tests/components/textfield/SelectionAndCursorPosition.java
@@ -30,7 +30,8 @@ public class SelectionAndCursorPosition extends TestBase {
ml.addListener(new Property.ValueChangeListener() {
@Override
public void valueChange(ValueChangeEvent event) {
- if (textField.getApplication() == null) {
+ if (textField.getUI() == null
+ || textField.getUI().getSession() == null) {
replaceComponent(textArea, textField);
activeComponent = textField;
} else {
diff --git a/uitest/src/com/vaadin/tests/layouts/ComplexGLColumnExpansionWithColSpan.java b/uitest/src/com/vaadin/tests/layouts/ComplexGLColumnExpansionWithColSpan.java
index f4050ea085..b584cdb5cf 100644
--- a/uitest/src/com/vaadin/tests/layouts/ComplexGLColumnExpansionWithColSpan.java
+++ b/uitest/src/com/vaadin/tests/layouts/ComplexGLColumnExpansionWithColSpan.java
@@ -73,7 +73,7 @@ public class ComplexGLColumnExpansionWithColSpan extends AbstractTestCase {
restart.addListener(new Button.ClickListener() {
@Override
public void buttonClick(Button.ClickEvent event) {
- mainLayout.getUI().getApplication().close();
+ mainLayout.getUI().getSession().close();
}
});
diff --git a/uitest/src/com/vaadin/tests/minitutorials/v7a1/CustomConverterFactoryUI.java b/uitest/src/com/vaadin/tests/minitutorials/v7a1/CustomConverterFactoryUI.java
index 2cbff64117..ff2263e208 100644
--- a/uitest/src/com/vaadin/tests/minitutorials/v7a1/CustomConverterFactoryUI.java
+++ b/uitest/src/com/vaadin/tests/minitutorials/v7a1/CustomConverterFactoryUI.java
@@ -7,7 +7,7 @@ import com.vaadin.ui.TextField;
public class CustomConverterFactoryUI extends AbstractTestUI {
@Override
public void setup(WrappedRequest request) {
- getApplication().setConverterFactory(new MyConverterFactory());
+ getSession().setConverterFactory(new MyConverterFactory());
TextField tf = new TextField("This is my double field");
tf.setImmediate(true);
diff --git a/uitest/src/com/vaadin/tests/minitutorials/v7a1/DynamicImageUI.java b/uitest/src/com/vaadin/tests/minitutorials/v7a1/DynamicImageUI.java
index d78cdd9ad5..632eda2491 100644
--- a/uitest/src/com/vaadin/tests/minitutorials/v7a1/DynamicImageUI.java
+++ b/uitest/src/com/vaadin/tests/minitutorials/v7a1/DynamicImageUI.java
@@ -20,12 +20,12 @@ public class DynamicImageUI extends AbstractTestUI {
@Override
public void setup(WrappedRequest request) {
// Add the request handler that handles our dynamic image
- getApplication().addRequestHandler(new DynamicImageRequestHandler());
+ getSession().addRequestHandler(new DynamicImageRequestHandler());
// Create a URL that we can handle in DynamicImageRequestHandler
URL imageUrl;
try {
- imageUrl = new URL(getApplication().getURL(),
+ imageUrl = new URL(getSession().getURL(),
DynamicImageRequestHandler.IMAGE_URL + "?text=Hello!");
} catch (MalformedURLException e) {
// This should never happen