"Load more" button loading more objects

Hi,

from the data, I load 5 objects by default using “Load Table Objects”. I added the “Load more” button and I would like it to show me another 5 objects each time I click on it. How to do it? I can’t find any instructions anywhere.

Thank you in advance for your help

Can anyone help me? I want to add any pagination of objects from the database that I load to the front end using UI Builder… please help

There are two parameters:

  1. page size
  2. page offset
    UI Builder - ConsoleDemo - Backendless 2022-04-18 03-54-40

The first one (page size) controls how many objects are to be returned by the server. In your case, you mentioned it is 5.
The second one (page offset) is the index of the object in the database to return. The very first object in the database has index 0. When you need to get additional 5 objects, you need to set the index to 5. For more information about paging, visit the following page in the docs:
https://backendless.com/docs/rest/data_data_paging.html

Regards,
Mark

Hi, @Rafal_Kokosinski

Welcome to our community and thanks for trying Backendless!

The following logic can be used as an option to what Mark mentioned earlier:

  1. On page Enter add the next logic:
    image

  2. On Click event handler of the “Load more” button, should have the next logic:

Regards, Marina

What do you think if I load all records upfront and then do the pagination on the page without loading any data from the server?

Hi @Jorg_Beyer ,

It is also an option. But you should consider possible drawbacks of this solution:

  1. When your table is big, you will be unable to load all records via one request since max page size in Cloud version of Backendless is 100 items per page.
  2. Loading of more objects than page contains can take more time.
  3. When you preload data, your page will miss all the new records which were added to the table after last data preload. The same applies for removed records.

If you understand moments described above and think that in your case they will not create any trouble then you can use your approach.

Regards, Andriy