Hi,
I have a large list, which I do not want to load all at once. I would like to load and display just one page and let the user navigate to other pages.
The problem I see with CellTable is that it needs the whole list at once (setRowData). So I have to transfer all the data. Is it possible just to load the data for one page, and load the next portion if the page changes?
Other questions:
How can I add a simple navigation buttons (page next, last) to a CellTable?
Finally, assume that the CellTable resides within a panel with a given size. Is it possible to set the page size so that there are no scroll bars, i. e. fill the panel with cell rows without exceeding the available space?
I have a large list, which I do not want to load all at once. I would like to load and display just one page and let the user navigate to other pages.
The problem I see with CellTable is that it needs the whole list at once (setRowData). So I have to transfer all the data. Is it possible just to load the data for one page, and load the next portion if the page changes?Are you kidding me? Just 2 days ago you asked how to display the whole data you loaded because CellTable uses paging by default!
Either you have the whole data set and you can call setRowData(List), which is just a shorthand for setRowCount(list.size());setRowData(0,list);Or you have only a portion of the data (generally the size of a page, but not necessarily) and you'll call setRowCount (either you know exactly how many items the whole dataset contains, and you can call setRowCount(int), or you're not sure and you'll call setRowCount(int,boolean) passing 'false' as the second argument; if you really don't know, you can pass any big value as the first argument, and then adjust it later when you've reached the end of the dataset, ofr instance) and setRowData(int,List).