src/aria/widgets/TemplateBasedWidget.js
function (args) {
            if (args.success) {
                this._subTplCtxt = args.templateCtxt;
                this._subTplModuleCtrl = args.templateCtxt.moduleCtrl;
                this._subTplData = this._subTplCtxt.data;
                if (this._subTplModuleCtrl) {
                    this._subTplModuleCtrl.$on({
                        '*' : this._onModuleEvent,
                        scope : this
                    });
                }
                // only register the bindings here, when the widget template is totally loaded
                this._registerBindings();

                // binding registering may refresh the page
                if (this._tplWidget) {
                    this.initWidgetDom(this._tplWidget.getDom());
                    this.$raiseEvent("widgetContentReady");
                }
            }
            // TODO: if not args.success, need to log something ?
        }
function (args) {
            if (args.success) {
                this._subTplCtxt = args.templateCtxt;
                this._subTplModuleCtrl = args.templateCtxt.moduleCtrl;
                this._subTplData = this._subTplCtxt.data;
                if (this._subTplModuleCtrl) {
                    this._subTplModuleCtrl.$on({
                        '*' : this._onModuleEvent,
                        scope : this
                    });
                }
                // only register the bindings here, when the widget template is totally loaded
                this._registerBindings();

                // binding registering may refresh the page
                if (this._tplWidget) {
                    this.initWidgetDom(this._tplWidget.getDom());
                    this.$raiseEvent("widgetContentReady");
                }
            }
            // TODO: if not args.success, need to log something ?
        }
function ( args ) { if ( args . success ) { this . _subTplCtxt = args . templateCtxt ; this . _subTplModuleCtrl = args . templateCtxt . moduleCtrl ; this . _subTplData = this . _subTplCtxt . data ; if ( this . _subTplModuleCtrl ) { this . _subTplModuleCtrl . $on ( { '*' : this . _onModuleEvent , scope : this } ) ; } // only register the bindings here, when the widget template is totally loaded this . _registerBindings ( ) ; // binding registering may refresh the page if ( this . _tplWidget ) { this . initWidgetDom ( this . _tplWidget . getDom ( ) ) ; this . $raiseEvent ( "widgetContentReady" ) ; } } // TODO: if not args.success, need to log something ? }
Callback executed after the template is loaded and initialized. As this widget has _directInit it gets
initialized soon after writing it to the DOM, however the callback can be executed after the first refresh if
the template context is not available
@param {Object} args Contains information about the load and instance of the template context
@protected
Callback executed after the template is loaded and initialized . As this widget has _directInit it gets initialized soon after writing it to the DOM however the callback can be executed after the first refresh if the template context is not available