Auto Page Refresh

0
I would like to automatically refresh a mendix page every X seconds/minutes to get updated information. The page will be displayed on an overhead TV in a warehouse to display upcoming orders and other data that is set by users in Mendix. The data I want to display will not be in a Data Grid, so I can't leverage the built-in functionality.  I will have URL's on the page so a browser refresh would work, but since this is on a TV, I need the system to automatically refresh without user input.  Also, I would rather not use a client side application to achieve auto-refresh.  Anyone have a best practice to complete this type of request?
asked
3 answers
5

Use the MicroflowTimer widget with a microflow with a Change Object activity set only to refresh your object.

answered
0

Great idea guys! Thank You!

answered
0

Late to the party, but I have a different approach. It continuously refreshes the page.

image.png

The second dataview ds_refresher is where the actual magic happens.

image.png

This is pretty simple: it continuously refreshes the parent dataview, causing the ds to be triggered, which refreshes the dataview. But that doesn't work, because you can't land on the page while it's loading. So there's a bool to subscribe to the refresh which is turned off. So the 3rd ds turns that bool back on. 

 

But that doesn't work for when you go to another page, and close it. Because you'd already be subscribed to the refresh, so it keeps loading, so it can't return to this page. So the last trick is that the first DS is triggered every time you return to this page. And it just creates a refresher object. It's immediately deleted in the second Dataview. That doesn't cause the first one to go again, so it can be used to reset the refresher. So this kinda functions as a feeler for when you enter this page.

 

It works. I don't know about performance yet.

answered