on 02-12-2016 9:36 AM
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
May be something like this could be helpful.
regards,
Sarbjeet Singh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Sarbjeet,
I have requirement where i need to refresh the Bar Chart after specific interval.
I tried same way but it does not trigger event after interval completion.
Please find code as below :-
onAfterRendering: function ()
{ var self = this;
this.intervalHandle = setInterval(self.reload(), 30000);
}
Please let me know what else i am missing over here .
Thank
Surekha
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.