diff options
author | Artur Signell <artur@vaadin.com> | 2016-10-10 22:15:16 +0300 |
---|---|---|
committer | Pekka Hyvönen <pekka@vaadin.com> | 2016-12-09 09:39:00 +0200 |
commit | 4ea2151053469f1092afaeab29587353c001e887 (patch) | |
tree | 46000e95450ed4460e4cd450467da529f8670952 /compatibility-server | |
parent | 76447b941ac64d5f1ad7bbf12555c3b73db23285 (diff) | |
download | vaadin-framework-4ea2151053469f1092afaeab29587353c001e887.tar.gz vaadin-framework-4ea2151053469f1092afaeab29587353c001e887.zip |
Add Grid.refreshRows to allow refreshing individual rows (#16765)
Change-Id: I554d7b6ca60840bab3a032daa4847e7271086e27
Diffstat (limited to 'compatibility-server')
-rw-r--r-- | compatibility-server/src/main/java/com/vaadin/v7/ui/Grid.java | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/Grid.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/Grid.java index 6c811d070e..ce78fa33cf 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/Grid.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/Grid.java @@ -6733,6 +6733,22 @@ public class Grid extends AbstractComponent 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()); } |