dojoAttachPoint used in the template and can be accessed in widgets using the attribute value.
So, if the html you posted is used in the widget template, you should use dojoAttachPoint . In the js file for the widget:
dojo.declare("MyWidget", [dijit._Widget, dijit._Templated], { alarmCatDialog: null, // the dialog widget will be attached to this field. templateString: dojo.cache(...), widgetsInTemplate: true, postCreate: function() { this.inherited(arguments); this.alarmCatDialog.show(); } });
You should not use id in widgets, because identifiers must be unique for all dom nodes. Using it in widgets limits the use of your widget on the page.
Also, since there are widgets in your template, you should use widgetsInTemplate: true
http://dojotoolkit.org/reference-guide/1.7/dijit/_Templated.html#widgetsintemplate
source share