summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2016-10-10 22:15:16 +0300
committerArtur Signell <artur@vaadin.com>2016-10-14 14:58:43 +0300
commitb3022c7f95ddca0a90ecfd8b9593941847a82998 (patch)
treed611eb3df1126c9f478b4381a1f1524ef6173baf /server
parentc7ca048dcc60b331c1b96bf4d3404a4abb18192e (diff)
downloadvaadin-framework-b3022c7f95ddca0a90ecfd8b9593941847a82998.tar.gz
vaadin-framework-b3022c7f95ddca0a90ecfd8b9593941847a82998.zip
Add Grid.refreshRows to allow refreshing individual rows (#16765)
Change-Id: I554d7b6ca60840bab3a032daa4847e7271086e27
Diffstat (limited to 'server')
-rw-r--r--server/src/main/java/com/vaadin/ui/Grid.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/server/src/main/java/com/vaadin/ui/Grid.java b/server/src/main/java/com/vaadin/ui/Grid.java
index e7eed7725f..34826bf6ee 100644
--- a/server/src/main/java/com/vaadin/ui/Grid.java
+++ b/server/src/main/java/com/vaadin/ui/Grid.java
@@ -6670,6 +6670,22 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
return itemId;
}
+ /**
+ * Refreshes, i.e. causes the client side to re-render the rows with the
+ * given item ids.
+ * <p>
+ * Calling this for a row which is not currently rendered on the client side
+ * has no effect.
+ *
+ * @param itemIds
+ * the item id(s) of the row to refresh.
+ */
+ public void refreshRows(Object... itemIds) {
+ for (Object itemId : itemIds) {
+ datasourceExtension.updateRowData(itemId);
+ }
+ }
+
private static Logger getLogger() {
return Logger.getLogger(Grid.class.getName());
}