Reputation: 5968
I'm making a widget that has a tabContainer in it, which needs to be started up after it's inserted into the DOM and ready.
However, my class actually responds with a view that you can instantiate yourself. Therefore, I want to have an 'onPlace' event or 'onComplete' event of some sort that starts up the tabContainer once it's been placed.
Can anyone lead me in any good direction on this? Can't seem to find much dojo / dijit documentation out there that can help!
Upvotes: 1
Views: 507
Reputation: 5968
Okay, after looking into the source code a bit I found this out:
If you widget inherits from dijit/_WidgetBase (mine did), you can overwrite the startup function which will happen after it's rendered.
For example:
tabContainer: value,
startup: function() {
this.tabContainer.startup();
}
I'm not sure if this is the most elegant, but if you have any input or solutions please feel free to add/comment/answer!
Upvotes: 0