diff options
author | Piotr Wilkin <piotr.wilkin@syndatis.com> | 2017-10-11 09:23:22 +0200 |
---|---|---|
committer | Henri Sara <henri.sara@gmail.com> | 2017-10-11 10:23:22 +0300 |
commit | 69c6675572e05c6b9c193b402f8d980f6af40884 (patch) | |
tree | 64976d3cf8b67a9b3465d7e20cb6f1332ce417ab | |
parent | cc136864d3562699b52a8a54a57cdb317029f69b (diff) | |
download | vaadin-framework-69c6675572e05c6b9c193b402f8d980f6af40884.tar.gz vaadin-framework-69c6675572e05c6b9c193b402f8d980f6af40884.zip |
Fix for Grid client-side exception. (#10166)
Do not try to update the select all checkbox if it is not visible.
Fixes #10164
-rwxr-xr-x | client/src/main/java/com/vaadin/client/widgets/Grid.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/client/src/main/java/com/vaadin/client/widgets/Grid.java b/client/src/main/java/com/vaadin/client/widgets/Grid.java index 5c3978c6a3..e51d8d57fc 100755 --- a/client/src/main/java/com/vaadin/client/widgets/Grid.java +++ b/client/src/main/java/com/vaadin/client/widgets/Grid.java @@ -1677,9 +1677,12 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>, if (grid.selectionColumn != null && grid.selectionColumn .getRenderer() instanceof MultiSelectionRenderer) { grid.refreshBody(); - CheckBox checkBox = (CheckBox) grid.getDefaultHeaderRow() + HeaderCell cell = grid.getDefaultHeaderRow().getCell(grid.selectionColumn); + if (cell.getType() == GridStaticCellType.WIDGET) { // if lazy provider, then no checkbox + CheckBox checkBox = (CheckBox) grid.getDefaultHeaderRow() .getCell(grid.selectionColumn).getWidget(); - checkBox.setEnabled(isEnabled); + checkBox.setEnabled(isEnabled); + } } } |