--- /dev/null
+package com.vaadin.tests.components.combobox;\r
+import java.util.Arrays;\r
+\r
+import com.vaadin.data.Property.ValueChangeEvent;\r
+import com.vaadin.data.Property.ValueChangeListener;\r
+import com.vaadin.tests.components.TestBase;\r
+import com.vaadin.ui.Select;\r
+import com.vaadin.ui.TextField;\r
+\r
+public class ComboBoxTextFieldEventOrder extends TestBase {\r
+\r
+ @Override\r
+ protected void setup() {\r
+ TextField textField = new TextField("text field");\r
+ textField.setImmediate(true);\r
+ final Select select = new Select("select", Arrays.asList("1", "2", "3",\r
+ "4"));\r
+ textField.addListener(new ValueChangeListener() {\r
+ public void valueChange(ValueChangeEvent event) {\r
+ select.addItem(Long.valueOf(select.size() + 1).toString()); // or\r
+ // just\r
+ // select.requestRepaint();\r
+ }\r
+ });\r
+ addComponent(textField);\r
+ addComponent(select);\r
+ }\r
+\r
+ @Override\r
+ protected String getDescription() {\r
+ return "Entering a text in a TextField and then clicking on the button in a ComboBox should cause the TextField value change to be sent first and the ComboBox filtering afterwards. Failure to do so will cause errors if the value change listener modifies the ComboBox";\r
+ }\r
+\r
+ @Override\r
+ protected Integer getTicketNumber() {\r
+ return 7481;\r
+ }\r
+}\r