I've the actual data = 25 records and then I sent the request
Page : 1 PageSize : 25
The data return with 25 records correctly but when I try
Page : 2 PageSize : 25
The data return with 25 records same way as Page 1 why the data is not ending on the first page ?
Could you please help me to fix this with any input ?
How can I get correct data on the page for any input?
Here is my code :
PagedListHolder<ObjectResponseDTO> pagedListHolder = new PagedListHolder<>(ObjectResponse);
pagedListHolder.setPage(Request.getPageDesc().getCurrentPage() - 1);
pagedListHolder.setPageSize(Request.getPageDesc().getPageSize());
PagedListHolder
is stateful and is on page Request.getPageDesc().getCurrentPage() - 1
.
You need to use the pagedListHolder.nextPage();
method to change the page number status.