Refresh a list view without reloading the page - Mendix Forum

Refresh a list view without reloading the page

2

Hi,

I have a list view  that is bind to a list which shows 25 items. I have a 'show more' button under the list that will call a microflow which will call an rest api and get the next 25 transactions. I'm currently appending the new list to the existing list and call the same page passing the updated list. But this is loading the whole page and its not a good customer experience. I'm wondering if there is a better way to append items to the existing list view on page without reloading the whole page. Greatly appreciate any help.

Here is the microflow that I'm currently using. I tried to do a refresh in client on the second last step and removed the last step to show the page. But is not refreshing the page.

asked
1 answers
2

Ganesh is right in his comment.

I created a test project that has 2 entities, Base and Transaction (both only containing an autonumber attribute.

I created a Base_Overview page with a grid filled with Base records. Also a Base_NewEdit page containing the attribute from Base and a listview over association from Transaction_Base.

Below the listview I added a microflow button and the action from the microflow creates 10 transactions everytime this button is clicked. Like below:

 In the Create action the transaction is created, associated to the current Base record, committed and refreshed.

Now when pressing the button on the NewEdit page the data in the listview is automatically shown, but only if the pagesize allows this. So I set the page size to 50 (for testing). With a new Base record the listview shows nothing. After the first click on the button the 10 created records are shown, after subsequent clicks the other records are shown. After pressing the button for the 6th time the new data is not shown automatically, only when the show more button used from the listview.

This solution works up to 1000 records as this is the limit for the pagesize of the listview. Expanding this might be possible with the help of the 'auto load more widget' from the appstore.

Hope this helps in finding a solution for your case.

answered