summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArtur Signell <artur.signell@itmill.com>2009-06-18 09:49:28 +0000
committerArtur Signell <artur.signell@itmill.com>2009-06-18 09:49:28 +0000
commit6a4552847b31420e71062568eaaf7f711e5766d3 (patch)
treed8199b7563e72cd1f96e71902efbf564becb11bd
parentac3dfa7a3450a16a270e448cab6cb2ebb3bf66f4 (diff)
downloadvaadin-framework-6a4552847b31420e71062568eaaf7f711e5766d3.tar.gz
vaadin-framework-6a4552847b31420e71062568eaaf7f711e5766d3.zip
Test case for #3066
svn changeset:8214/svn branch:6.0
-rw-r--r--src/com/vaadin/tests/components/optiongroup/OptionGroupMultipleValueChange.java42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/com/vaadin/tests/components/optiongroup/OptionGroupMultipleValueChange.java b/src/com/vaadin/tests/components/optiongroup/OptionGroupMultipleValueChange.java
new file mode 100644
index 0000000000..ccb5b10c08
--- /dev/null
+++ b/src/com/vaadin/tests/components/optiongroup/OptionGroupMultipleValueChange.java
@@ -0,0 +1,42 @@
+package com.vaadin.tests.components.optiongroup;
+
+import com.vaadin.data.Property;
+import com.vaadin.data.Property.ValueChangeEvent;
+import com.vaadin.tests.components.TestBase;
+import com.vaadin.ui.Label;
+import com.vaadin.ui.OptionGroup;
+
+public class OptionGroupMultipleValueChange extends TestBase {
+
+ @Override
+ protected String getDescription() {
+ return "Clicking on the description of an option should behave exactly like clicking on the radio button. No extra 'null' valuechange event should be sent";
+ }
+
+ @Override
+ protected Integer getTicketNumber() {
+ return 3066;
+ }
+
+ @Override
+ protected void setup() {
+ final OptionGroup og = new OptionGroup();
+ og
+ .addItem("Clicking on the text might cause an extra valuechange event");
+ og.addItem("Second option, same thing");
+ og.setImmediate(true);
+ addComponent(og);
+
+ final Label events = new Label("", Label.CONTENT_PREFORMATTED);
+ events.setWidth(null);
+ addComponent(events);
+
+ og.addListener(new Property.ValueChangeListener() {
+
+ public void valueChange(ValueChangeEvent event) {
+ String s = "ValueChange: " + event.getProperty().getValue();
+ events.setValue(events.getValue() + "\n" + s);
+ }
+ });
+ }
+}