src/aria/widgets/form/list/List.js
function (key, newValue, oldValue) {
            // If the template needs a refresh, refreshNeeded has to be set to true
            // by each of the updates below that needs a refresh
            var refreshNeeded = false;
            var moduleCtrl = this._subTplModuleCtrl;
            // var data = this._subTplCtxt.data;
            if (key == "selectedValues") {
                moduleCtrl.setSelectedValues(newValue);
            } else if (key == "selectedIndex") {
                moduleCtrl.setSelectedIndex(newValue);
            } else if (key == "disabled") {
                moduleCtrl.setDisabled(newValue);
                refreshNeeded = true;
            } else if (key == "maxOptions") {
                moduleCtrl.setMaxSelectedCount(newValue);
            } else if (key == "items") {
                moduleCtrl.setItems(newValue);
                refreshNeeded = true;
                this._retrieveControllerSelection();
            } else if (key == "multipleSelect") {
                moduleCtrl.setMultipleSelect(newValue);
            }
            if (refreshNeeded) {
                // TODO: this should be replaced by an event sent from the module controller
                // (but this would not be backward-compatible with current list templates)
                this._subTplCtxt.$refresh();
            }
        }
function (key, newValue, oldValue) {
            // If the template needs a refresh, refreshNeeded has to be set to true
            // by each of the updates below that needs a refresh
            var refreshNeeded = false;
            var moduleCtrl = this._subTplModuleCtrl;
            // var data = this._subTplCtxt.data;
            if (key == "selectedValues") {
                moduleCtrl.setSelectedValues(newValue);
            } else if (key == "selectedIndex") {
                moduleCtrl.setSelectedIndex(newValue);
            } else if (key == "disabled") {
                moduleCtrl.setDisabled(newValue);
                refreshNeeded = true;
            } else if (key == "maxOptions") {
                moduleCtrl.setMaxSelectedCount(newValue);
            } else if (key == "items") {
                moduleCtrl.setItems(newValue);
                refreshNeeded = true;
                this._retrieveControllerSelection();
            } else if (key == "multipleSelect") {
                moduleCtrl.setMultipleSelect(newValue);
            }
            if (refreshNeeded) {
                // TODO: this should be replaced by an event sent from the module controller
                // (but this would not be backward-compatible with current list templates)
                this._subTplCtxt.$refresh();
            }
        }
function ( key , newValue , oldValue ) { // If the template needs a refresh, refreshNeeded has to be set to true // by each of the updates below that needs a refresh var refreshNeeded = false ; var moduleCtrl = this . _subTplModuleCtrl ; // var data = this._subTplCtxt.data; if ( key == "selectedValues" ) { moduleCtrl . setSelectedValues ( newValue ) ; } else if ( key == "selectedIndex" ) { moduleCtrl . setSelectedIndex ( newValue ) ; } else if ( key == "disabled" ) { moduleCtrl . setDisabled ( newValue ) ; refreshNeeded = true ; } else if ( key == "maxOptions" ) { moduleCtrl . setMaxSelectedCount ( newValue ) ; } else if ( key == "items" ) { moduleCtrl . setItems ( newValue ) ; refreshNeeded = true ; this . _retrieveControllerSelection ( ) ; } else if ( key == "multipleSelect" ) { moduleCtrl . setMultipleSelect ( newValue ) ; } if ( refreshNeeded ) { // TODO: this should be replaced by an event sent from the module controller // (but this would not be backward-compatible with current list templates) this . _subTplCtxt . $refresh ( ) ; } }
Called when json data that we have properties bound to are externally changed. In general we need to update
our internal data model and refresh the sub template if needed.
@param {String} key The property changed
@param {Object} newValue
@param {Object} oldValue
Called when json data that we have properties bound to are externally changed . In general we need to update our internal data model and refresh the sub template if needed .