Hi
I need to refresh my screen every 5 minutes. I saw there is a way to do it on traditional web apps. What about Reactive apps?
Hello cpinho,
You need to do what Prasad said defining a setInterval to call a client action that does the refresh data of your DataAction.
see this thread for a sample. https://www.outsystems.com/forums/discussion/57813/how-to-auto-refresh-dashboard-lists-in-reactive/
Regards
Fabio
Hi,
In reactive web you do not need to refresh the screen because as soon as variables/aggregates are updated the screen refresh to show the new data.
You can set a timeout or interval and call the client action, inside client action you can update the variable or refresh the aggregate whichever is your use case
Regards.
Hello cpinho
Since all UI elements in reactive web update immediately, you won’t need to use Ajax Refresh anymore. The apps automatically understand what widgets need to be updated when data changes.
And since all client-side logic can be visually modeled, you won’t have to deal with hard to maintain JavaScript anymore; optimized JavaScript will be automatically created for you. OutSystems is also generating and securing REST APIs behind the scenes to support communication between browser and server, using the minimum network bandwidth required for the data transfer.
I hope this helps you,
Cheers
Thanks for this. I dont get it. I am getting the data from an external API.Every 5 minutes data is refreshed and entities in server get updated. But the secreen never updates.
What am I missing then?
The documentation shows the version to add a button to refresh the screen or block. Which is what I want to avoid. I simply want to refresh automatically if data has changed.
While editing items in lists it is more efficient to only refresh the affected items in the interface than the entire list. OutSystems provides system actions to manipulate lists. When the list you manipulate is being displayed on the screen, these actions can also refresh the affected elements displayed on the screen right away.To update list items in Reactive Web and Mobile:Display the list on a screen.Add a button or link that updates the list.In the action associated with the button or link, drag the Execute Action from the toolbox to the action flow.Select one of the following system actions to manipulate elements in the list variable bound with the widget displayed on the screen:ListAppendListAppendAllListInsertListRemoveListClearThe widget automatically displays the updated list.
While editing items in lists it is more efficient to only refresh the affected items in the interface than the entire list. OutSystems provides system actions to manipulate lists. When the list you manipulate is being displayed on the screen, these actions can also refresh the affected elements displayed on the screen right away.
To update list items in Reactive Web and Mobile:
Hi cpinho,
You can also use this Forge component: https://www.outsystems.com/forge/Component_Overview.aspx?ProjectId=8422
I had the building blocks already lying around and your request "pushed" me to gather them and publish them as a component. Hope they help!
Kind regards,
Vincent
edit: see it in action here: https://vkoning.outsystemscloud.com/TimingEventsDemo/
I have made updates to the forge component so you can also enable and disable the Interval and Timeout widgets whenever needed. Be sure to check it out :)
Greetings,