]> source.dussan.org Git - vaadin-framework.git/commitdiff
Update client side selection state when changing selection model (#20370)
authorArtur Signell <artur@vaadin.com>
Sat, 15 Oct 2016 20:02:15 +0000 (23:02 +0300)
committerPekka Hyvönen <pekka@vaadin.com>
Fri, 9 Dec 2016 07:39:00 +0000 (09:39 +0200)
Change-Id: I7fe8c160405a69140cac511c744d89a62c401cca

compatibility-server/src/main/java/com/vaadin/v7/ui/Grid.java
uitest/src/test/java/com/vaadin/tests/components/grid/GridSelectionTest.java

index ef35808f993e349e966724aa7068d54c97ec0cf7..f5399f60ce3a57d91c9ad92907bc7f68c36f4928 100644 (file)
@@ -5656,6 +5656,10 @@ public class Grid extends AbstractComponent
             if (!SharedUtil.equals(oldSelection, newSelection)) {
                 fireSelectionEvent(oldSelection, newSelection);
             }
+
+            // selection is included in the row data, so the client needs to be
+            // updated
+            datasourceExtension.refreshCache();
         }
     }
 
index 6682d0bec551148ac6b9c0081ee6b97d708ac89d..699edf462b3ece2e6ab19896b8dfd952c116123f 100644 (file)
@@ -426,5 +426,4 @@ public class GridSelectionTest extends GridBasicsTest {
     private GridRowElement getRow(int i) {
         return getGridElement().getRow(i);
     }
-
 }