docs: function (res, args) {
              var tplcfg = this._tplcfg;
              if (!tplcfg) {
                  // the template may be ready after the widget has been disposed
                  // do nothing in this case
                  // except disposing the module which has just been created
                  if (args.autoDispose) {
                      res.moduleCtrlPrivate.$dispose();
                  }
                  return;
              }
  
              var tplDiv = this._subTplDiv; // may be null at this time
  
              tplcfg.tplDiv = tplDiv;
              tplcfg.div = this._domElt;
              tplcfg.data = this._cfg.data;
  
              // if a module controller was created, inject it in template initialization
              if (res.moduleCtrl) {
                  tplcfg.moduleCtrl = res.moduleCtrl;
              }
              tplcfg.isRootTemplate = false; // a Template Widget is not a root template
              tplcfg.context = this._context;
  
              if (args.autoDispose) {
                  if (tplcfg.toDispose == null) {
                      tplcfg.toDispose = [res.moduleCtrlPrivate];
                  } else {
                      tplcfg.toDispose.push(res.moduleCtrlPrivate);
                  }
              }
  
              var tplCtxt = new ariaTemplatesTemplateCtxt();
              this.subTplCtxt = tplCtxt;
              tplCtxt.parent = this._context;
  
              var res = tplCtxt.initTemplate(tplcfg);
  
              if (res) {
                  tplCtxt.dataReady(); // data successfully loaded: signal to template through TemplateContext
                  // check that tplCtxt was not disposed
                  if (tplDiv && tplCtxt._cfg) {
                      // Load the CSS dependencies, the style should be added before the html
                      tplDiv.className = tplCtxt.getCSSClassNames();
                      tplCtxt.$onOnce({
                          "Ready" : this.__innerTplReadyCb,
                          "SectionRefreshed" : {
                              fn : this.__innerTpl1stRefreshed,
                              args : {
                                  success : true,
                                  templateCtxt : tplCtxt
                              },
                              scope : this
                          },
                          scope : this
                      });
                      tplCtxt.$refresh();
                  }
                  // don't clean this object, as the template context will do it. Just break reference
                  this.tplcfg = null;
  
              } else {
                  tplCtxt.$dispose();
                  this.subTplCtxt = null;
                  this._errorWhileLoadingTemplate();
              }
  
              tplDiv = null;
          }