I'd like to know when a Dojo form widget is parsed or ready so I can customize it dynamically. I am trying to achieve this by using the dojo.connect()
method. However, I am not sure what event to listen to. Is it onLoad
or onStartup
or..?
This is what I have done but it isn't triggering:
dojo.connect(dijit.byId('myWidget'), 'onStartup', function(evt) {
console.debug("test");
}
note that the dijit.byId('myWidget')
part returns the object correctly so that isn't the problem.
The Dojo Toolkit is a powerful open source JavaScript library that can be used to create rich and varied user interfaces running within a browser. The library requires no browser-side runtime plug-in and runs natively on all major browsers.
It depends somewhat on what exactly you are trying to customize (see the widget lifecycle here) but I would guess that connecting to postCreate
will satisfy your requirements
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With