docs: function (args) {
              if (!this._cfg) {
                  //template has been disposed no need to refresh
                  return;
              }
              if (ariaTemplatesRefreshManager.isStopped()) {
                  // look for the section to be refreshed, and notify it:
                  if (args) {
                      var sectionToRefresh = args.section;
                      if (sectionToRefresh && this._mainSection) {
                          var section = this._mainSection.getSectionById(sectionToRefresh);
                          if (section) {
                              section.notifyRefreshPlanned(args);
                              return;
                          }
                      }
                  }
                  ariaTemplatesRefreshManager.queue({
                      fn : this.$refresh,
                      args : args,
                      scope : this
                  }, this);
              } else {
                  if (!this._cfg.tplDiv) {
                      // this can happen if calling $refresh before linkToPreviousMarkup is called
                      // (for example: including a sub-template which is already in the cache, and calling refresh in
                      // the onModuleEvent of the sub-template with no condition in the template script)
                      this.$logError(this.TEMPLATE_NOT_READY_FOR_REFRESH, [this.tplClasspath]);
                      return;
                  }
  
                  if (this._refreshing) {
                      this.$logError(this.ALREADY_REFRESHING, [this.tplClasspath]);
                      // TODO: call return when backward compatibility is removed
                  }
  
                  this._refreshing = true;
  
                  // PROFILING // var profilingId = this.$startMeasure("Refreshing " + this.tplClasspath);
  
                  // stopping the refresh manager ensure that what we are doing now will not impact elements that will
                  // be disposed
                  ariaTemplatesRefreshManager.stop();
                  // stopping the CSS Manager as weel to avoid refreshing it every time we create a widget
                  ariaTemplatesCSSMgr.stop();
  
                  this.$assert(304, !!this._tpl); // CSS dependencies
  
                  var validatorParam = {
                      json : args,
                      beanName : "aria.templates.CfgBeans.RefreshCfg"
                  };
  
                  ariaCoreJsonValidator.normalize(validatorParam);
                  args = validatorParam.json;
  
                  // call the $beforeRefresh if defined in the script associated to the template
                  this.beforeRefresh(args);
  
                  var section = this.getRefreshedSection({
                      section : args.section,
                      macro : args.macro
                  });
  
                  // Before removing the content from the DOM dispose any processing indicators to avoid leaks
                  this.__disposeProcessingIndicators();
  
                  // Inserting a section will add the html in the page, resume the CSSMgr before
                  ariaTemplatesCSSMgr.resume();
  
                  if (section != null) {
                      this.insertSection(section, false, args);
                  }
  
                  this._refreshing = false;
  
                  // PROFILING // this.$stopMeasure(profilingId);
                  // restaure refresh manager
                  ariaTemplatesRefreshManager.resume();
  
                  // WARNING: this must always be the last thing to do
                  if (section != null) {
                      // call the $afterRefresh if defined in the script associated to the template
                      this.afterRefresh(args);
                      this.$raiseEvent({
                          name : "SectionRefreshed",
                          sectionID : section.id
                      });
                  }
              }
          }