src/aria/templates/View.js
function (oldValues) {
                var j = 0, items = [], filteredOutElements = 0;
                var initialArray = this.initialArray;
                for (var p in initialArray) {
                    if (initialArray.hasOwnProperty(p) && !json.isMetadata(p)) {
                        var iaElt = initialArray[p];
                        var itemsElt = null;
                        if (oldValues) {
                            itemsElt = oldValues.pop(iaElt);
                        }

                        if (itemsElt == null) {
                            itemsElt = {
                                value : iaElt,
                                initIndex : p,
                                filteredIn : true,
                                sortKey : null,
                                pageIndex : 0
                            };
                            json.addListener(itemsElt, "filteredIn", this._jsonChangeCallback, true);
                        } else {
                            itemsElt.pageIndex = 0;
                        }
                        items[j] = itemsElt;
                        if (!itemsElt.filteredIn) {
                            filteredOutElements++;
                        }
                        j++;
                    }
                }
                return {
                    items : items,
                    filteredOutElements : filteredOutElements
                };

            }
function (oldValues) {
                var j = 0, items = [], filteredOutElements = 0;
                var initialArray = this.initialArray;
                for (var p in initialArray) {
                    if (initialArray.hasOwnProperty(p) && !json.isMetadata(p)) {
                        var iaElt = initialArray[p];
                        var itemsElt = null;
                        if (oldValues) {
                            itemsElt = oldValues.pop(iaElt);
                        }

                        if (itemsElt == null) {
                            itemsElt = {
                                value : iaElt,
                                initIndex : p,
                                filteredIn : true,
                                sortKey : null,
                                pageIndex : 0
                            };
                            json.addListener(itemsElt, "filteredIn", this._jsonChangeCallback, true);
                        } else {
                            itemsElt.pageIndex = 0;
                        }
                        items[j] = itemsElt;
                        if (!itemsElt.filteredIn) {
                            filteredOutElements++;
                        }
                        j++;
                    }
                }
                return {
                    items : items,
                    filteredOutElements : filteredOutElements
                };

            }
function ( oldValues ) { var j = 0 , items = [ ] , filteredOutElements = 0 ; var initialArray = this . initialArray ; for ( var p in initialArray ) { if ( initialArray . hasOwnProperty ( p ) && ! json . isMetadata ( p ) ) { var iaElt = initialArray [ p ] ; var itemsElt = null ; if ( oldValues ) { itemsElt = oldValues . pop ( iaElt ) ; } if ( itemsElt == null ) { itemsElt = { value : iaElt , initIndex : p , filteredIn : true , sortKey : null , pageIndex : 0 } ; json . addListener ( itemsElt , "filteredIn" , this . _jsonChangeCallback , true ) ; } else { itemsElt . pageIndex = 0 ; } items [ j ] = itemsElt ; if ( ! itemsElt . filteredIn ) { filteredOutElements ++ ; } j ++ ; } } return { items : items , filteredOutElements : filteredOutElements } ; }
Build the items array starting from the initial map and taking into account the items that are already
present in the items array of the view
@protected
@param {aria.utils.StackHashMap} oldValues map of the items that are already present in the items array,
indexed by item value
@return {Object} contains the items array and the number of elements that are filtered out
Build the items array starting from the initial map and taking into account the items that are already present in the items array of the view