diff options
author | Artur Signell <artur@vaadin.com> | 2012-09-06 22:42:20 +0300 |
---|---|---|
committer | Artur Signell <artur@vaadin.com> | 2012-09-06 22:42:41 +0300 |
commit | 8d390ff6691a18ff33622ab9ee7c9e63c4fddc91 (patch) | |
tree | f855be2b8aff94886233fdc02c00afa528576d43 | |
parent | 553f67b697e749263a133413a77be64175b23c59 (diff) | |
download | vaadin-framework-8d390ff6691a18ff33622ab9ee7c9e63c4fddc91.tar.gz vaadin-framework-8d390ff6691a18ff33622ab9ee7c9e63c4fddc91.zip |
Simple override for getItemIds(int,int) for TreeTable (#9509)
-rw-r--r-- | server/src/com/vaadin/ui/Table.java | 7 | ||||
-rw-r--r-- | server/src/com/vaadin/ui/TreeTable.java | 8 |
2 files changed, 14 insertions, 1 deletions
diff --git a/server/src/com/vaadin/ui/Table.java b/server/src/com/vaadin/ui/Table.java index 989e6adba8..e5fde02d69 100644 --- a/server/src/com/vaadin/ui/Table.java +++ b/server/src/com/vaadin/ui/Table.java @@ -1968,7 +1968,7 @@ public class Table extends AbstractSelect implements Action.Container, // index Container.Indexed indexed = ((Container.Indexed) items); - List<?> itemIds = indexed.getItemIds(firstIndex, rows); + List<?> itemIds = getItemIds(firstIndex, rows); for (int i = 0; i < rows && i < itemIds.size(); i++) { Object id = itemIds.get(i); // Start by parsing the values, id should already be set @@ -2017,6 +2017,11 @@ public class Table extends AbstractSelect implements Action.Container, return cells; } + protected List<Object> getItemIds(int firstIndex, int rows) { + return (List<Object>) ((Container.Indexed) items).getItemIds( + firstIndex, rows); + } + /** * Update a cache array for a row, register any relevant listeners etc. * diff --git a/server/src/com/vaadin/ui/TreeTable.java b/server/src/com/vaadin/ui/TreeTable.java index ef5850a8af..8bf72c2db1 100644 --- a/server/src/com/vaadin/ui/TreeTable.java +++ b/server/src/com/vaadin/ui/TreeTable.java @@ -869,4 +869,12 @@ public class TreeTable extends Table implements Hierarchical { return Logger.getLogger(TreeTable.class.getName()); } + @Override + protected List<Object> getItemIds(int firstIndex, int rows) { + List<Object> itemIds = new ArrayList<Object>(); + for (int i = firstIndex; i < firstIndex + rows; i++) { + itemIds.add(getIdByIndex(i)); + } + return itemIds; + } } |