src/aria/templates/View.js
function (changeType) {
                if (changeType) {
                    this.notifyChange(changeType);
                }
                var curState = this._currentState;
                // initial array synchronization
                this._refreshInitialArray();
                this.$assert(156, curState.initialArray == this.initialArray);

                // sort refresh
                if (this.sortOrder == this.SORT_INITIAL) {
                    if (curState.sortOrder != this.SORT_INITIAL) {
                        this._resetSortOrder();
                    }
                    this.sortName = null;
                    this.sortKeyGetter = null;
                } else if (curState.sortKeyGetter != this.sortKeyGetter || curState.sortName != this.sortName
                        || (this._changes & this.CHANGED_SORT_CRITERIA)) {
                    this._sort();
                } else if (this.sortOrder != curState.sortOrder) {
                    this.$assert(167, (this.sortOrder != this.SORT_INITIAL)
                            && (curState.sortKeyGetter == this.sortKeyGetter) && (curState.sortName == this.sortName)
                            && !(this._changes & this.CHANGED_SORT_CRITERIA));
                    // here, we have the same sort name, same sort key getter
                    // we have no change in the sort criteria, but different orders (ascending and descending),
                    // only have to reverse the order (less expensive than sorting)
                    this.items.reverse();
                    curState.sortOrder = this.sortOrder;
                    this._changes = this._changes | this._CHANGED_PAGE_DATA;
                }
                this.$assert(176, this.sortOrder == curState.sortOrder);
                this.$assert(177, this.sortKeyGetter == curState.sortKeyGetter);
                this.$assert(178, this.sortName == curState.sortName);

                // page refresh
                if (curState.pageSize != this.pageSize
                        || (this._changes & (this._CHANGED_PAGE_DATA | this._CHANGED_FILTERED_IN))) {
                    this._refreshPageData();
                }
                this.$assert(181, this.pageSize == curState.pageSize);
                if (this.pageMode) {
                    this.$assert(194, this.pages.length >= 0);
                    if (this.currentPageIndex < 0) {
                        this.currentPageIndex = 0;
                    } else if (this.currentPageIndex >= this.pages.length) {
                        this.currentPageIndex = this.pages.length - 1;
                    }
                } else {
                    this.currentPageIndex = 0;
                }
                curState.currentPageIndex = this.currentPageIndex;
                this._changes = 0;
            }
function (changeType) {
                if (changeType) {
                    this.notifyChange(changeType);
                }
                var curState = this._currentState;
                // initial array synchronization
                this._refreshInitialArray();
                this.$assert(156, curState.initialArray == this.initialArray);

                // sort refresh
                if (this.sortOrder == this.SORT_INITIAL) {
                    if (curState.sortOrder != this.SORT_INITIAL) {
                        this._resetSortOrder();
                    }
                    this.sortName = null;
                    this.sortKeyGetter = null;
                } else if (curState.sortKeyGetter != this.sortKeyGetter || curState.sortName != this.sortName
                        || (this._changes & this.CHANGED_SORT_CRITERIA)) {
                    this._sort();
                } else if (this.sortOrder != curState.sortOrder) {
                    this.$assert(167, (this.sortOrder != this.SORT_INITIAL)
                            && (curState.sortKeyGetter == this.sortKeyGetter) && (curState.sortName == this.sortName)
                            && !(this._changes & this.CHANGED_SORT_CRITERIA));
                    // here, we have the same sort name, same sort key getter
                    // we have no change in the sort criteria, but different orders (ascending and descending),
                    // only have to reverse the order (less expensive than sorting)
                    this.items.reverse();
                    curState.sortOrder = this.sortOrder;
                    this._changes = this._changes | this._CHANGED_PAGE_DATA;
                }
                this.$assert(176, this.sortOrder == curState.sortOrder);
                this.$assert(177, this.sortKeyGetter == curState.sortKeyGetter);
                this.$assert(178, this.sortName == curState.sortName);

                // page refresh
                if (curState.pageSize != this.pageSize
                        || (this._changes & (this._CHANGED_PAGE_DATA | this._CHANGED_FILTERED_IN))) {
                    this._refreshPageData();
                }
                this.$assert(181, this.pageSize == curState.pageSize);
                if (this.pageMode) {
                    this.$assert(194, this.pages.length >= 0);
                    if (this.currentPageIndex < 0) {
                        this.currentPageIndex = 0;
                    } else if (this.currentPageIndex >= this.pages.length) {
                        this.currentPageIndex = this.pages.length - 1;
                    }
                } else {
                    this.currentPageIndex = 0;
                }
                curState.currentPageIndex = this.currentPageIndex;
                this._changes = 0;
            }
function ( changeType ) { if ( changeType ) { this . notifyChange ( changeType ) ; } var curState = this . _currentState ; // initial array synchronization this . _refreshInitialArray ( ) ; this . $assert ( 156 , curState . initialArray == this . initialArray ) ; // sort refresh if ( this . sortOrder == this . SORT_INITIAL ) { if ( curState . sortOrder != this . SORT_INITIAL ) { this . _resetSortOrder ( ) ; } this . sortName = null ; this . sortKeyGetter = null ; } else if ( curState . sortKeyGetter != this . sortKeyGetter || curState . sortName != this . sortName || ( this . _changes & this . CHANGED_SORT_CRITERIA ) ) { this . _sort ( ) ; } else if ( this . sortOrder != curState . sortOrder ) { this . $assert ( 167 , ( this . sortOrder != this . SORT_INITIAL ) && ( curState . sortKeyGetter == this . sortKeyGetter ) && ( curState . sortName == this . sortName ) && ! ( this . _changes & this . CHANGED_SORT_CRITERIA ) ) ; // here, we have the same sort name, same sort key getter // we have no change in the sort criteria, but different orders (ascending and descending), // only have to reverse the order (less expensive than sorting) this . items . reverse ( ) ; curState . sortOrder = this . sortOrder ; this . _changes = this . _changes | this . _CHANGED_PAGE_DATA ; } this . $assert ( 176 , this . sortOrder == curState . sortOrder ) ; this . $assert ( 177 , this . sortKeyGetter == curState . sortKeyGetter ) ; this . $assert ( 178 , this . sortName == curState . sortName ) ; // page refresh if ( curState . pageSize != this . pageSize || ( this . _changes & ( this . _CHANGED_PAGE_DATA | this . _CHANGED_FILTERED_IN ) ) ) { this . _refreshPageData ( ) ; } this . $assert ( 181 , this . pageSize == curState . pageSize ) ; if ( this . pageMode ) { this . $assert ( 194 , this . pages . length >= 0 ) ; if ( this . currentPageIndex < 0 ) { this . currentPageIndex = 0 ; } else if ( this . currentPageIndex >= this . pages . length ) { this . currentPageIndex = this . pages . length - 1 ; } } else { this . currentPageIndex = 0 ; } curState . currentPageIndex = this . currentPageIndex ; this . _changes = 0 ; }
Refresh the view data after something has changed. Do nothing if nothing has changed.
@param {Integer} changeType If specified, call notifyChange with that parameter before doing the refresh. This
parameter can be either CHANGED_INITIAL_ARRAY or CHANGED_SORT_CRITERIA or a bitwise OR of both.
Refresh the view data after something has changed . Do nothing if nothing has changed .