Server side pagination

0
Hi, My application reads the data from different system using rest calls and display them as a list. Is there a way to retrieve the data per page from server onclick of page number instead of loading everything to the client and performing client side pagination? Thanks in advance. 
asked
2 answers
3

Why do you want to do this? Because of performance issues? Or just want to limit the rest calls to gather all the data? When its about the performance, maybe you can build something to first get the first 10 objects and show them, and in the meanwhile get all the other objects without the user is knowing this? 

Otherwise, when you want to add pagination, i guess the best way to do is creating your own pagination buttons, But when you want to use numbers instead of only next or previous, you have to know how many objects there are. 

Example:

- Use a pagehelper where you store the active pagenumber 
- Create a next and previous button
- Attach the list entity to your page helper. Make an association
- On page show, create a pagehelper and set active pagenumber on 1. 
- Retrieve the first set of data and link it with pagehelper. For example 10 objects. 
- When hitting the next button, set the active page number on current+1
- Delete the old data, retrieve the new data (10 -20 range) and link them to the pagehelper.
- Refresh the pagehelper.

answered
1

Yes there is.

First, upon calling the page do the rest-call and store all the data on the server.

Second see App https://appstore.home.mendix.com/link/app/105694/ and use it’s pagination features.

answered