docs: function (widgetName, out, cfg, lineNbr) {
              var classpath = this.widgets[widgetName];
              try {
                  if (classpath) {
                      // default object if cfg was null
                      if (!cfg) {
                          cfg = {};
                      }
                      var widgetClass = Aria.getClassRef(classpath);
                      var instance = new widgetClass(cfg, out.tplCtxt, lineNbr);
                      out.registerBehavior(instance);
                      instance.writeMarkupBegin(out);
                      return instance;
                  } else {
                      // This should normally never happen, as the error will probably be caught after the call
                      // of getWidgetDependencies by the TplClassGenerator (see the "@" statement in
                      // aria.templates.Statements).
                      throw this.UNKWOWN_WIDGET;
                  }
              } catch (error) {
                  out.write("#Error in widget:" + widgetName + "#");
                  this.$logError(this.ERROR_WIDGET_INIT, [out.tplCtxt.tplClasspath, lineNbr, widgetName,
                          "writeMarkupBegin"], error);
              }
          }