0

Given:

CellTable<List<String>> table = new CellTable<List<String>>();
ListDataProvider<List<String>> dataProvider = new ListDataProvider<List<String>>();
dataProvider.addDataDisplay(table);
List<List<String>> list = dataProvider.getList();

what is the simplest code to count total of rows in a celltable?

Tom
  • 825
  • 1
  • 8
  • 28

2 Answers2

1

if getRowCount not working , why dont you try to get the size of the array u have , you must be pushing some array in the celltable , why don't just get the size of array ..

junaidp
  • 10,801
  • 29
  • 89
  • 137
  • thax, i did, but it's weird that table or simplepager doesn't have the function to get total rows. – Tom Apr 23 '13 at 12:59
0

getRowCount() ??

Get the total count of all rows.

getVisibleItemCount()

Get the number of visible items being displayed. Note that this value might be less than the page size if there is not enough data to fill the page.

and also see the method getVisibleRange() which returns range oobject and then you can get by range.getLength()

Suresh Atta
  • 120,458
  • 37
  • 198
  • 307