Showing results for 
Search instead for 
Did you mean: 

how to refresh model in xml, js view after interval

Former Member
0 Kudos


I want to have auto refresh into my UI, I’m using XML and javascript. Here is the case: I’m reading the data and filling the model(viewModel) with this data, then I build the view using this model. As into the backend the data will be changed, at some point, I want to have some kind of timer used to refresh the data automatically. I have looked for a standard solution, but for now I can’t find one. If you have any suggestion, please share.

Accepted Solutions (1)

Accepted Solutions (1)

Active Contributor

to achieve this you can use nameless function with setInterval, as below

//inside oninit,component file or any particular function
   // code for model refresh
   alert('Model refreshed after 5000 MS');


0 Kudos

Hello Akhilesh,

I was having the same problem and your answer solved it, thanks



Answers (0)