diff options
Diffstat (limited to 'server/src/com/vaadin/ui')
-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; + } } |