Auto-refresh page

1
0
-1

Hello,

Is there a way to add auto-refresh to page? I tried to edit "zip" file and add additional line to index.html:

< meta http-equiv="refresh" content="30" >

But it change the structure of zip file and it is not possible to import it to Bonita Portal.

Is there a better way to refresh page every 30 sec?

Thanks in advance

1 answer

1
0
-1

Hello,

the best in that circumstance, the best is to add a new widget and do the refresh in the widget.

Why do you want to refresh your page like this? Angular will refresh what is needed when it's needed. Do you want maybe to call a Rest API every 30 seconds? Something else?

Best,

Comments

Submitted by dariusz.skarbek... on Thu, 01/21/2021 - 14:18

Hi,

Thank you for answering. Yes - the main idea is to refresh variable "Business Data" every 30 seconds.

I have created Custom Widget "Auto-refresh" and how can I refresh variable on page?

Thanks for any support,

Submitted by Pierre-yves Monnet on Wed, 02/03/2021 - 00:37

Hello,

then the best is not to refresh the page, but to refresh the REST API

1/ create a Javascript variable. In this Javascript, arm a timer to return a new value every 30 s (actually, I have no idea to do that - maybe a widget is a better and simplest way? this widget required a property variable and refresh it every 30s).

Idea is to have a variable which get change the value every 30 s. Return then the current time in ms

2/ in your REST API, add a parameters &t={{MyJavaScriptVariable}}

Idea is, because the JavaScript variable changed, then the REST API Signature change then the UI Designer will call again the REST CALL.

This is only ideas here, should be tested.

Notifications