cancel
Showing results for 
Search instead for 
Did you mean: 

how can I use the setMainTaskColor event inside onAfterRendering?

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (2)

Answers (2)

jamie_cawley
Advisor
Advisor
0 Kudos

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

former_member560141
Participant
0 Kudos

You can call it inside the function with this.

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