diff options
Diffstat (limited to 'uitest/src/com/vaadin/tests/components/grid/basicfeatures/GridBasicFeatures.java')
-rw-r--r-- | uitest/src/com/vaadin/tests/components/grid/basicfeatures/GridBasicFeatures.java | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/uitest/src/com/vaadin/tests/components/grid/basicfeatures/GridBasicFeatures.java b/uitest/src/com/vaadin/tests/components/grid/basicfeatures/GridBasicFeatures.java index c98ee5c53b..a9cc528ac0 100644 --- a/uitest/src/com/vaadin/tests/components/grid/basicfeatures/GridBasicFeatures.java +++ b/uitest/src/com/vaadin/tests/components/grid/basicfeatures/GridBasicFeatures.java @@ -127,6 +127,14 @@ public class GridBasicFeatures extends AbstractComponentTest<Grid> { } }; + private ItemClickListener editorOpeningItemClickListener = new ItemClickListener() { + + @Override + public void itemClick(ItemClickEvent event) { + grid.editItem(event.getItemId()); + } + }; + private ColumnReorderListener columnReorderListener = new ColumnReorderListener() { @Override @@ -643,6 +651,19 @@ public class GridBasicFeatures extends AbstractComponentTest<Grid> { } }); + createBooleanAction("EditorOpeningItemClickListener", "State", false, + new Command<Grid, Boolean>() { + + @Override + public void execute(Grid c, Boolean value, Object data) { + if (!value) { + c.removeItemClickListener(editorOpeningItemClickListener); + } else { + c.addItemClickListener(editorOpeningItemClickListener); + } + } + + }); createBooleanAction("ColumnReorderListener", "State", false, new Command<Grid, Boolean>() { |