diff options
author | Sauli Tähkäpää <sauli@vaadin.com> | 2015-08-26 21:43:17 +0300 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2016-05-13 12:21:46 +0000 |
commit | 7f3481b7a69d9edc31c7e70b305ece6816eee36f (patch) | |
tree | a96219d0ff50c4531625886c0af271ed97e7384a /uitest/src/main | |
parent | c6f185a1c420af5ca67a5dc9200db15dcc8e2365 (diff) | |
download | vaadin-framework-7f3481b7a69d9edc31c7e70b305ece6816eee36f.tar.gz vaadin-framework-7f3481b7a69d9edc31c7e70b305ece6816eee36f.zip |
Disable multiselect checkboxes when Grid is disabled. (#18560)
Change-Id: Ief0531fe90b9bc8bcf0a60132211a0633b9401d4
Diffstat (limited to 'uitest/src/main')
-rw-r--r-- | uitest/src/main/java/com/vaadin/tests/components/grid/GridDisabledMultiselect.java | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/GridDisabledMultiselect.java b/uitest/src/main/java/com/vaadin/tests/components/grid/GridDisabledMultiselect.java new file mode 100644 index 0000000000..4846a41672 --- /dev/null +++ b/uitest/src/main/java/com/vaadin/tests/components/grid/GridDisabledMultiselect.java @@ -0,0 +1,32 @@ +package com.vaadin.tests.components.grid; + +import com.vaadin.server.VaadinRequest; +import com.vaadin.tests.components.AbstractTestUI; +import com.vaadin.ui.Button; +import com.vaadin.ui.Grid; + +public class GridDisabledMultiselect extends AbstractTestUI { + + @Override + protected void setup(VaadinRequest request) { + final Grid grid = new Grid(); + grid.addColumn("foo", String.class); + grid.addRow("bar"); + grid.setSelectionMode(Grid.SelectionMode.SINGLE); + addComponent(grid); + + addButton("Multi", new Button.ClickListener() { + @Override + public void buttonClick(Button.ClickEvent event) { + grid.setSelectionMode(Grid.SelectionMode.MULTI); + } + }); + + addButton("Disable", new Button.ClickListener() { + @Override + public void buttonClick(Button.ClickEvent event) { + grid.setEnabled(!grid.isEnabled()); + } + }); + } +}
\ No newline at end of file |