Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dojo on widget load event

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.

like image 679
Ayyoudy Avatar asked Aug 30 '11 16:08

Ayyoudy


People also ask

What is Dojo Toolkit used for?

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.


1 Answers

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

like image 176
Alex.Bullard Avatar answered Sep 25 '22 15:09

Alex.Bullard