cancel
Showing results for 
Search instead for 
Did you mean: 

SAPUI5 auto refresh binding

fsafa
Discoverer
0 Kudos
74

Is there any possible way  to check if value  is changing other than using interval?

 

 
            this._intervalId = setInterval(function () {

            var sPath1= `/SalesOrderManage('${sSalesOrderID1}')/SalesOrderType`;
 
             }, 2500); // 5000 milliseconds = 5 seconds
           
        },
code is just small preview but i get data like this  oModel.bindContext(sPath1).requestObject() and i have to refresh the value of data, but i wanna know is there any possible way to get it without interval?
View Entire Topic
Marian_Zeis
Active Contributor
0 Kudos

The front end has no way of knowing about changes in the backend unless it explicitly queries the server. In many cases, using WebSockets can provide real-time updates, but that might be overkill for your situation.
Therefore, relying on a simple polling interval is often the most straightforward and effective solution for keeping frontend data up to date.