]> source.dussan.org Git - vaadin-framework.git/commitdiff
Use value change listeners instead of click listeners for checkboxes
authorArtur Signell <artur.signell@itmill.com>
Mon, 6 Feb 2012 06:52:47 +0000 (06:52 +0000)
committerArtur Signell <artur@vaadin.com>
Mon, 6 Feb 2012 06:58:29 +0000 (08:58 +0200)
svn changeset:22912/svn branch:6.7

tests/testbench/com/vaadin/tests/components/table/HeaderFooterClickLeftRightMiddle.java

index 642067d826f70a94e23ee2772de1008736506513..c3cfb685dd465072d8046f9fa248dc88d1feec33 100644 (file)
@@ -33,10 +33,10 @@ public class HeaderFooterClickLeftRightMiddle extends TestBase {
         CheckBox immediateCheckbox = new CheckBox("Immediate");
         immediateCheckbox.setImmediate(true);
         immediateCheckbox.setValue(table.isImmediate());
-        immediateCheckbox.addListener(new ClickListener() {
+        immediateCheckbox.addListener(new ValueChangeListener() {
 
-            public void buttonClick(ClickEvent event) {
-                table.setImmediate(event.getButton().booleanValue());
+            public void valueChange(ValueChangeEvent event) {
+                table.setImmediate((Boolean) event.getProperty().getValue());
             }
         });
 
@@ -107,11 +107,11 @@ public class HeaderFooterClickLeftRightMiddle extends TestBase {
                 "Column reordering allowed");
         columnReorderingCheckbox.setImmediate(true);
         columnReorderingCheckbox.setValue(table.isColumnReorderingAllowed());
-        columnReorderingCheckbox.addListener(new ClickListener() {
+        columnReorderingCheckbox.addListener(new ValueChangeListener() {
 
-            public void buttonClick(ClickEvent event) {
-                table.setColumnReorderingAllowed(event.getButton()
-                        .booleanValue());
+            public void valueChange(ValueChangeEvent event) {
+                table.setColumnReorderingAllowed((Boolean) event.getProperty()
+                        .getValue());
             }
         });