summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2014-08-04 15:18:43 +0300
committerVaadin Code Review <review@vaadin.com>2014-08-05 07:15:02 +0000
commitcfef40132aa87daef50f9b479bd02f1579352d6d (patch)
treec3e930e0947f4f4f385ff0e5850a73cf0eb91242
parent7b9cea29ff116fe4a7440b3de1b2cdbf2e57710a (diff)
downloadvaadin-framework-cfef40132aa87daef50f9b479bd02f1579352d6d.tar.gz
vaadin-framework-cfef40132aa87daef50f9b479bd02f1579352d6d.zip
Avoid sharing containers to prevent problems (#14200)
Change-Id: Ifc3286fce10dd4e64fd1001b786599fe66c89077
-rw-r--r--uitest/src/com/vaadin/tests/themes/valo/ComboBoxes.java21
1 files changed, 9 insertions, 12 deletions
diff --git a/uitest/src/com/vaadin/tests/themes/valo/ComboBoxes.java b/uitest/src/com/vaadin/tests/themes/valo/ComboBoxes.java
index 5c1d188937..1b8b290d91 100644
--- a/uitest/src/com/vaadin/tests/themes/valo/ComboBoxes.java
+++ b/uitest/src/com/vaadin/tests/themes/valo/ComboBoxes.java
@@ -15,7 +15,6 @@
*/
package com.vaadin.tests.themes.valo;
-import com.vaadin.data.Container;
import com.vaadin.navigator.View;
import com.vaadin.navigator.ViewChangeListener.ViewChangeEvent;
import com.vaadin.server.ThemeResource;
@@ -40,13 +39,11 @@ public class ComboBoxes extends VerticalLayout implements View {
row.setSpacing(true);
addComponent(row);
- Container generatedContainer = ValoThemeUI
- .generateContainer(200, false);
ComboBox combo = new ComboBox("Normal");
combo.setInputPrompt("You can type here");
- combo.setContainerDataSource(generatedContainer);
+ combo.setContainerDataSource(ValoThemeUI.generateContainer(200, false));
combo.setNullSelectionAllowed(false);
- combo.select(generatedContainer.getItemIds().iterator().next());
+ combo.select(combo.getItemIds().iterator().next());
combo.setItemCaptionPropertyId(ValoThemeUI.CAPTION_PROPERTY);
combo.setItemIconPropertyId(ValoThemeUI.ICON_PROPERTY);
combo.setItemIcon(combo.getItemIds().iterator().next(),
@@ -60,9 +57,9 @@ public class ComboBoxes extends VerticalLayout implements View {
combo = new ComboBox();
combo.setInputPrompt("You can type here");
- combo.setContainerDataSource(generatedContainer);
+ combo.setContainerDataSource(ValoThemeUI.generateContainer(200, false));
combo.setNullSelectionAllowed(false);
- combo.select(generatedContainer.getItemIds().iterator().next());
+ combo.select(combo.getItemIds().iterator().next());
combo.setItemCaptionPropertyId(ValoThemeUI.CAPTION_PROPERTY);
combo.setItemIconPropertyId(ValoThemeUI.ICON_PROPERTY);
combo.setWidth("240px");
@@ -120,7 +117,7 @@ public class ComboBoxes extends VerticalLayout implements View {
combo = new ComboBox("Custom color");
combo.setInputPrompt("You can type here");
- combo.setContainerDataSource(generatedContainer);
+ combo.setContainerDataSource(ValoThemeUI.generateContainer(200, false));
combo.setItemCaptionPropertyId(ValoThemeUI.CAPTION_PROPERTY);
combo.setItemIconPropertyId(ValoThemeUI.ICON_PROPERTY);
combo.addStyleName("color1");
@@ -128,7 +125,7 @@ public class ComboBoxes extends VerticalLayout implements View {
combo = new ComboBox("Custom color");
combo.setInputPrompt("You can type here");
- combo.setContainerDataSource(generatedContainer);
+ combo.setContainerDataSource(ValoThemeUI.generateContainer(200, false));
combo.setItemCaptionPropertyId(ValoThemeUI.CAPTION_PROPERTY);
combo.setItemIconPropertyId(ValoThemeUI.ICON_PROPERTY);
combo.addStyleName("color2");
@@ -136,7 +133,7 @@ public class ComboBoxes extends VerticalLayout implements View {
combo = new ComboBox("Custom color");
combo.setInputPrompt("You can type here");
- combo.setContainerDataSource(generatedContainer);
+ combo.setContainerDataSource(ValoThemeUI.generateContainer(200, false));
combo.setItemCaptionPropertyId(ValoThemeUI.CAPTION_PROPERTY);
combo.setItemIconPropertyId(ValoThemeUI.ICON_PROPERTY);
combo.addStyleName("color3");
@@ -144,7 +141,7 @@ public class ComboBoxes extends VerticalLayout implements View {
combo = new ComboBox("Small");
combo.setInputPrompt("You can type here");
- combo.setContainerDataSource(generatedContainer);
+ combo.setContainerDataSource(ValoThemeUI.generateContainer(200, false));
combo.setItemCaptionPropertyId(ValoThemeUI.CAPTION_PROPERTY);
combo.setItemIconPropertyId(ValoThemeUI.ICON_PROPERTY);
combo.addStyleName("small");
@@ -152,7 +149,7 @@ public class ComboBoxes extends VerticalLayout implements View {
combo = new ComboBox("Large");
combo.setInputPrompt("You can type here");
- combo.setContainerDataSource(generatedContainer);
+ combo.setContainerDataSource(ValoThemeUI.generateContainer(200, false));
combo.setItemCaptionPropertyId(ValoThemeUI.CAPTION_PROPERTY);
combo.setItemIconPropertyId(ValoThemeUI.ICON_PROPERTY);
combo.addStyleName("large");