title: DOJO Custom Dialog Box - does not parse template file
body: <p>I am new to DOJO. I have a custom widget , which uses a template file for the dialog box contents.
  I am extending dijit.Dialog in the script file.</p>
  
  <pre><code>dojo.declare(
      "custom.credentials",
      [dijit._WidgetBase, dijit._Templated,dijit._WidgetsInTemplateMixin,**dijit.Dialog**],
      {
  
  
            templatePath: dojo.moduleUrl("custom", "templates/credentials.html"),
            ....
            ....
            postCreate: function() {
  
            this.inherited(arguments);
            alert(this.containerNode);
            alert(this.mainDIV);  
               },
            });
  </code></pre>
  
  <p>My Template test file looks like this</p>
  
  <pre><code>&lt;div data-dojo-attach-point="mainDIV"&gt;
      Login Dialog Box template here
  &lt;/div&gt;
  </code></pre>
  
  <p>For some reason, when I alert on <strong>this.mainDIV</strong>, I get 'undefined'. It does not read the template file. Also, this.containerNode gives me 'HTMLDIVElement', (parent dijit dialog DIV).</p>
  
  <p>I am not able to figure out after a lot of trial error where exactly the issue is. Any help would be greatly appreciated.</p>
  
  <p><strong>Calling code</strong></p>
  
  <pre><code>function opnPop(){
  var pop= dijit.byId("customPopup");
      pop.show();
  }
  
  &lt;div dojoType="custom.credentials" id="customPopup"/&gt;
  </code></pre>
  
  <p><strong>Note :</strong> *<em>When dijit.Dialog is <strong>not</strong> extended</em>* it reads the template file without any problem, I.e, I am able to access this.mainDIV.innerHTML , that contains my own inner html contents.</p>
  
  <p>Thank you.</p>