So this is what I'm seeing as I step through

performOnInit is called which calls onInit in my page class - within onInit

I set the dataprovider via



       pTable.setDataProvider(new PagingDataProvider<pItem>() {

            int size = p.size();

            public int size() {
                return size;
            }

            public Iterable<PItem> getData() {
                int start = pTable.getFirstRow();

                final int pagedEnd = start + pTable.getPageSize();
                int end = pagedEnd < this.size ? pagedEnd : size;

                return pItems.subList(start, end);
            }
        });



setDataProvider then calls setRowList(null)

But at this point I see that rowList is populated with my first page
of data even though I have a break point on the getdata method (and
createrowlist) of my pagingdataprovider - when did the rowlist get
populated?

I'm also overriding the init method of the table where I set the page
to the last page - the page renders with the paginator showing the
last page highligted but the dataset shows my first page of data..

(adding table.onProcess doesn't appear to change anything)


Any ideas most welcome - seems as though my debugger is missing
something, not sure what though.

Thanks, Damian

On Mon, Oct 10, 2011 at 10:30 PM, Damian Penney <[email protected]> wrote:
> What is the most efficient way to have a table with a paginator
> initially render the last page of data?
>
> I'm trying to call setPageNumber(table.getNumPages()) but the rowlist
> is already created before I can sneak in. Tried overriding the init
> method of the table but still no dice.
>
> Any pointers appreciated.
>
> Thanks, Damian
>

Reply via email to