src/aria/templates/Section.js
function (bhv) {
                var bhvId = (bhv.getId ? bhv.getId() : null);

                var element = {
                    _type : TYPE_BEHAVIOR,
                    behavior : bhv,
                    section : this,
                    id : bhvId
                };

                if (bhvId && this.idMap) {
                    if (this.idMap[bhvId]) {
                        // TODO: change error message as this may be, in the future, other things than a widget
                        // TODO: add context info
                        this.$logError(this.WIDGET_ID_NOT_UNIQUE, [this.tplCtxt.tplClasspath, bhvId, bhv.$class]);
                        element.id = null;
                    } else {
                        this.idMap[bhvId] = element;
                    }
                }
                this._content.push(element);
            }
function (bhv) {
                var bhvId = (bhv.getId ? bhv.getId() : null);

                var element = {
                    _type : TYPE_BEHAVIOR,
                    behavior : bhv,
                    section : this,
                    id : bhvId
                };

                if (bhvId && this.idMap) {
                    if (this.idMap[bhvId]) {
                        // TODO: change error message as this may be, in the future, other things than a widget
                        // TODO: add context info
                        this.$logError(this.WIDGET_ID_NOT_UNIQUE, [this.tplCtxt.tplClasspath, bhvId, bhv.$class]);
                        element.id = null;
                    } else {
                        this.idMap[bhvId] = element;
                    }
                }
                this._content.push(element);
            }
function ( bhv ) { var bhvId = ( bhv . getId ? bhv . getId ( ) : null ) ; var element = { _type : TYPE_BEHAVIOR , behavior : bhv , section : this , id : bhvId } ; if ( bhvId && this . idMap ) { if ( this . idMap [ bhvId ] ) { // TODO: change error message as this may be, in the future, other things than a widget // TODO: add context info this . $logError ( this . WIDGET_ID_NOT_UNIQUE , [ this . tplCtxt . tplClasspath , bhvId , bhv . $class ] ) ; element . id = null ; } else { this . idMap [ bhvId ] = element ; } } this . _content . push ( element ) ; }
Register a widget in this section
@param {Object} bhv the behaviour to add to this section
Register a widget in this section