From: Artur Signell Date: Mon, 4 Aug 2014 12:18:43 +0000 (+0300) Subject: Avoid sharing containers to prevent problems (#14200) X-Git-Tag: 7.3.0.rc1~11^2~75 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=cfef40132aa87daef50f9b479bd02f1579352d6d;p=vaadin-framework.git Avoid sharing containers to prevent problems (#14200) Change-Id: Ifc3286fce10dd4e64fd1001b786599fe66c89077 --- 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");