In our previous blog , we explained about using Pagination in Lift using Scala . But If you render a page via AJAX , pagination link would not be refreshed until we reload the page .
In this blog , we will have a basic idea that how to refresh pagination via AJAX .
Suppose you are displaying an item list on web and you want to paginate that list then you have to implement
PaginatorSnippet in your snippet class file .
Override count , itemPerPage and page properties .
count – number of all items you have (here all Measurements)
page – represents current slice
itemPerPage – Number of Items per page
Now define RequestVar holders for Pagination
Now define render method .
Finally add below markup in your HTML file .
View original post 5 more words