summaryrefslogtreecommitdiffstats
path: root/uitest
diff options
context:
space:
mode:
authorPekka Hyvönen <pekka@vaadin.com>2016-12-09 09:14:56 +0200
committerGitHub <noreply@github.com>2016-12-09 09:14:56 +0200
commit22063cfe1a027057e523ccd85937162af43edfd8 (patch)
tree21fae6cecb4c32de02787b4b1ee5cff284d5754b /uitest
parenta95dadcde5a223aacc3005b298d66e00419454e8 (diff)
downloadvaadin-framework-22063cfe1a027057e523ccd85937162af43edfd8.tar.gz
vaadin-framework-22063cfe1a027057e523ccd85937162af43edfd8.zip
Add a generic selection listener to Grid & SelectionModels (#105)
* Add a generic selection listener to Grid & SelectionModels Fixes some inconsistent event naming and invalid javadocs. Fixes vaadin/framework8-issues#541
Diffstat (limited to 'uitest')
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/abstractlisting/AbstractSingleSelectTestUI.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/basics/GridBasics.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/radiobutton/RadioButtonGroupTestUI.java2
3 files changed, 6 insertions, 6 deletions
diff --git a/uitest/src/main/java/com/vaadin/tests/components/abstractlisting/AbstractSingleSelectTestUI.java b/uitest/src/main/java/com/vaadin/tests/components/abstractlisting/AbstractSingleSelectTestUI.java
index 544cc73dc7..f2dc3c20ad 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/abstractlisting/AbstractSingleSelectTestUI.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/abstractlisting/AbstractSingleSelectTestUI.java
@@ -33,7 +33,7 @@ public abstract class AbstractSingleSelectTestUI<T extends AbstractSingleSelect<
protected void createListenerMenu() {
createListenerAction("Selection listener", "Listeners",
- c -> c.addSelectionChangeListener(
+ c -> c.addSelectionListener(
e -> log("Selected: " + e.getValue())));
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/basics/GridBasics.java b/uitest/src/main/java/com/vaadin/tests/components/grid/basics/GridBasics.java
index 430692477d..4f9d733f44 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/basics/GridBasics.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/basics/GridBasics.java
@@ -230,7 +230,7 @@ public class GridBasics extends AbstractTestUIWithLog {
selectionListenerRegistration = ((SingleSelectionModelImpl<DataObject>) grid
.getSelectionModel())
- .addSelectionListener(this::onSingleSelect);
+ .addSingleSelectionListener(this::onSingleSelect);
layout.addComponent(createMenu());
layout.addComponent(grid);
@@ -512,7 +512,7 @@ public class GridBasics extends AbstractTestUIWithLog {
grid.setSelectionMode(SelectionMode.SINGLE);
selectionListenerRegistration = ((SingleSelectionModelImpl<DataObject>) grid
.getSelectionModel())
- .addSelectionListener(this::onSingleSelect);
+ .addSingleSelectionListener(this::onSingleSelect);
grid.asSingleSelect().setReadOnly(isUserSelectionAllowed);
});
selectionModelItem.addItem("multi", menuItem -> {
@@ -558,10 +558,10 @@ public class GridBasics extends AbstractTestUIWithLog {
selectionListenerRegistration.remove();
MultiSelectionModelImpl<DataObject> model = (MultiSelectionModelImpl<DataObject>) grid
.setSelectionMode(SelectionMode.MULTI);
- model.addSelectionListener(this::onMultiSelect);
+ model.addMultiSelectionListener(this::onMultiSelect);
grid.asMultiSelect().setReadOnly(isUserSelectionAllowed);
selectionListenerRegistration = model
- .addSelectionListener(this::onMultiSelect);
+ .addMultiSelectionListener(this::onMultiSelect);
}
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/radiobutton/RadioButtonGroupTestUI.java b/uitest/src/main/java/com/vaadin/tests/components/radiobutton/RadioButtonGroupTestUI.java
index 07e5b2c4d0..672ab1a49f 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/radiobutton/RadioButtonGroupTestUI.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/radiobutton/RadioButtonGroupTestUI.java
@@ -102,7 +102,7 @@ public class RadioButtonGroupTestUI
protected void createListenerMenu() {
createListenerAction("Selection listener", "Listeners",
- c -> c.addSelectionChangeListener(
+ c -> c.addSelectionListener(
e -> log("Selected: " + e.getSelectedItem())));
}