Skip to Content
avatar image
Former Member

how can I use the setMainTaskColor event inside onAfterRendering?

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)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Apr 16 at 12:12 PM

    You can call it inside the function with this.

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

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 16 at 01:08 PM

    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

    Add comment
    10|10000 characters needed characters exceeded