src/aria/widgets/form/list/ListController.js
function (itemsList) {
            var selectedCount = this._data.selectedCount;
            var maxSelectedCount = this._getTrueMaxSelectedCount();
            for (var i = 0, l = itemsList.length; i < l; i++) {
                var item = itemsList[i];
                var res = item.initiallyDisabled;
                if (!res && selectedCount >= maxSelectedCount) {
                    res = !item.selected;
                }
                this.json.setValue(item, "currentlyDisabled", res);
            }
        }
function (itemsList) {
            var selectedCount = this._data.selectedCount;
            var maxSelectedCount = this._getTrueMaxSelectedCount();
            for (var i = 0, l = itemsList.length; i < l; i++) {
                var item = itemsList[i];
                var res = item.initiallyDisabled;
                if (!res && selectedCount >= maxSelectedCount) {
                    res = !item.selected;
                }
                this.json.setValue(item, "currentlyDisabled", res);
            }
        }
function ( itemsList ) { var selectedCount = this . _data . selectedCount ; var maxSelectedCount = this . _getTrueMaxSelectedCount ( ) ; for ( var i = 0 , l = itemsList . length ; i < l ; i ++ ) { var item = itemsList [ i ] ; var res = item . initiallyDisabled ; if ( ! res && selectedCount >= maxSelectedCount ) { res = ! item . selected ; } this . json . setValue ( item , "currentlyDisabled" , res ) ; } }
Update the currentlyDisabled properties of each item in itemsList, based on the initiallyDisabled and
selected properties and on the current number of selected items.
@param {Array} itemsList array of items (sub-array of this._data.items) whose currentlyDisabled properties
have to be updated
@protected
Update the currentlyDisabled properties of each item in itemsList based on the initiallyDisabled and selected properties and on the current number of selected items .