Skip to Content
0

how can I use the setMainTaskColor event inside onAfterRendering?

Apr 16 at 12:03 PM

19

avatar image
Former Member

in my comtroller.js ther is a event names setMainTaskColor, and I just want to use it in my view.js inside onAfteRendering: . please help me

s1.png (12.1 kB)
s2.png (19.8 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Nicholas Owen O’Malley Apr 16 at 12:12 PM
0

You can call it inside the function with this.

onAfterRendering: function(){
    this.setMainTaskColor();
}

Share
10 |10000 characters needed characters left characters exceeded
Jamie Cawley
Apr 16 at 01:08 PM
0

If you are using the event delegate, you would need to scope the function which can be done numerous ways such as using bind

.addEventDelegate: function({
onAfterRendering: function() {
this.setMainTaskColor();
}.bind(this)
})

Regards,

Jamie

Share
10 |10000 characters needed characters left characters exceeded