Quantcast
Channel: SCN : Unanswered Discussions - SAP Fiori
Viewing all articles
Browse latest Browse all 1879

this.getView is not a function

$
0
0

Hi all,

 

while creating a ui5 application, I'm trying to implement an auto refresh.

 

return Controller.extend("Dashboard.controller.DashboardMasterView", {  formatter: formatter,  onBeforeRendering: function() {  console.log("Dashboard.controller.DashboardMasterView onBeforeRendering");  },  onAfterRendering: function() {  console.log("Dashboard.controller.DashboardMasterView onAfterRendering");  setInterval(function() {       console.log(this.getView().getModel());  }, 10000);  },  onInit: function() {  console.log("Dashboard.controller.DashboardMasterView OnInit");

I'm setting the model within in the view, at onInit function, but how could I access the model in the setInterval function? I always getting the error, that this.getView is not a function.

 

Thanks in advance, Chris


Viewing all articles
Browse latest Browse all 1879

Latest Images

Trending Articles



Latest Images