js/core/List.js
function (items, options) {
            items = items || [];
            var self = this;
            this.each(function (item) {
                if (item instanceof EventDispatcher) {
                    item.unbind('*', self._onItemEvent, self);
                    item.unbind('change', self._onItemChange, self);
                }
            });

            this.$items = items || [];

            this.each(function (item) {
                if (item instanceof EventDispatcher) {
                    item.bind('*', self._onItemEvent, self);
                    item.bind('change', self._onItemChange, self);
                }
            });

            options = options || {};
            if (!options.silent) {
                this.trigger('reset', {items: items});
            }
        }
function (items, options) {
            items = items || [];
            var self = this;
            this.each(function (item) {
                if (item instanceof EventDispatcher) {
                    item.unbind('*', self._onItemEvent, self);
                    item.unbind('change', self._onItemChange, self);
                }
            });

            this.$items = items || [];

            this.each(function (item) {
                if (item instanceof EventDispatcher) {
                    item.bind('*', self._onItemEvent, self);
                    item.bind('change', self._onItemChange, self);
                }
            });

            options = options || {};
            if (!options.silent) {
                this.trigger('reset', {items: items});
            }
        }
function ( items , options ) { items = items || [ ] ; var self = this ; this . each ( function ( item ) { if ( item instanceof EventDispatcher ) { item . unbind ( '*' , self . _onItemEvent , self ) ; item . unbind ( 'change' , self . _onItemChange , self ) ; } } ) ; this . $items = items || [ ] ; this . each ( function ( item ) { if ( item instanceof EventDispatcher ) { item . bind ( '*' , self . _onItemEvent , self ) ; item . bind ( 'change' , self . _onItemChange , self ) ; } } ) ; options = options || { } ; if ( ! options . silent ) { this . trigger ( 'reset' , { items : items } ) ; } }
Resets the list with the given items and triggers reset event
@param {Array} items
@param {Object} options
Resets the list with the given items and triggers reset event