summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeemu Suo-Anttila <teemusa@vaadin.com>2015-09-08 17:36:57 +0300
committerMika Murtojarvi <mika@vaadin.com>2015-09-14 12:59:39 +0300
commit44d3e1c1a89c8c46ace408c457976b636ece2a19 (patch)
tree8860faf91bb79413515d2460400a4881b3038cc5
parent0dd2cf42652a3ebd2ac2c53f2bb35c837a72bdfc (diff)
downloadvaadin-framework-44d3e1c1a89c8c46ace408c457976b636ece2a19.tar.gz
vaadin-framework-44d3e1c1a89c8c46ace408c457976b636ece2a19.zip
Fix Editor selection checkbox handling to be more specific (#18818)
Change-Id: Ic33572d3cd9e6117dc133bbfe26bc707c4b84f21
-rw-r--r--client/src/com/vaadin/client/widgets/Grid.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/client/src/com/vaadin/client/widgets/Grid.java b/client/src/com/vaadin/client/widgets/Grid.java
index 8d7e6f892c..4e91342091 100644
--- a/client/src/com/vaadin/client/widgets/Grid.java
+++ b/client/src/com/vaadin/client/widgets/Grid.java
@@ -141,6 +141,7 @@ import com.vaadin.client.widget.grid.events.ScrollHandler;
import com.vaadin.client.widget.grid.events.SelectAllEvent;
import com.vaadin.client.widget.grid.events.SelectAllHandler;
import com.vaadin.client.widget.grid.selection.HasSelectionHandlers;
+import com.vaadin.client.widget.grid.selection.MultiSelectionRenderer;
import com.vaadin.client.widget.grid.selection.SelectionEvent;
import com.vaadin.client.widget.grid.selection.SelectionHandler;
import com.vaadin.client.widget.grid.selection.SelectionModel;
@@ -1361,7 +1362,9 @@ public class Grid<T> extends ResizeComposite implements
}
private void updateSelectionCheckboxesAsNeeded(boolean isEnabled) {
- if (grid.getSelectionModel() instanceof Multi) {
+ // FIXME: This is too much guessing. Define a better way to do this.
+ if (grid.selectionColumn != null
+ && grid.selectionColumn.getRenderer() instanceof MultiSelectionRenderer) {
grid.refreshBody();
CheckBox checkBox = (CheckBox) grid.getDefaultHeaderRow()
.getCell(grid.selectionColumn).getWidget();