In play framework model we can return Page object to render in our view, but Page class can only call from finder object.
public static Page<DokumenKeluarFileModel> search(int page, int pageSize, String sortBy, String order, String filter){
return find.where(filter)
.orderBy(sortBy + " " + order)
.findPagingList(pageSize)
.setFetchAhead(false)
.getPage(page);
}
My question here is Could i use this Page object without using finder object? because i have a list and i want to return it with pagination to the view. Thanks for the advice
A pagination module exists, but it does not look up to date.
You could try my quick implementation of
Page
:To create a page: