Hi,

I try sample data paging with PagingDataProvider.
It's working. But when I click on a paging number and inspect in the log
console, it see that the table component call to getCountryService several
times.
What's cause this problem?

table.setDataProvider(new PagingDataProvider<Country>() {
            public List<Country> getData() {
                int start = table.getFirstRow();
                int count = table.getPageSize();
                String sortColumn = table.getSortedColumn();
                boolean ascending = table.isSortedAscending();
                log.info(start);
                log.info(count);
                return getCountryService().findAll(start, count, sortColumn,
ascending);
            }
            public int size() {
                int i = getCountryService().getTotalCountry().intValue();
                log.info(i);
                return i;
            }
        });



Thanks,
Budianto

Reply via email to