jeff.pace

Is there an "on dijit created" event?

Discussion created by jeff.pace on May 27, 2014
Latest reply on May 28, 2014 by jeff.pace

i need to hook an onclick event to an element that doesnt exist until a dijit is created

 

 

 editorWidget = new Editor(params,'editorDiv');       
        editorWidget.startup();

          //override attribute button to show attribute pane
           function openAttribute(){
               
               registry.byId("EditContainer").selectChild(registry.byId("editAttributePane"));
          };
            //element doesnt exist until editorWidget is done being created, so sometimes this works, sometimes it doesnt
              registry.byId('btnAttributes').attr('onClick', openAttribute);

 

 

but the registry.byId('btnAttributes') is null until the editor dijit is done being created.  I would prefer not to set timeouts (i even tried 3 seconds, seems 50/50 that it would work)

 

Is there a way to figure out that the editor dijit is done starting up?

Outcomes