docs: function (newItems) {
  
              var itemsListener = this._itemsListener;
              var json = this.json;
              var oldItems = this._data.items;
              var numberOfItems;
  
              if (oldItems == newItems) {
                  // items did not change
                  // return;
                  numberOfItems = newItems.length;
              } else {
                  if (oldItems) {
                      // remove the listener on the old items object:
                      for (var i = 0, l = oldItems.length; i < l; i++) {
                          json.removeListener(oldItems[i], null, itemsListener);
                      }
                  }
                  json.setValue(this._data, "items", newItems);
  
                  if (newItems) {
                      numberOfItems = newItems.length;
                      // add the listener on the new items object:
                      for (var i = 0, l = newItems.length; i < l; i++) {
                          json.addListener(newItems[i], null, itemsListener);
                      }
                      var view = this._data.itemsView;
                      if (view) {
                          view.initialArray = newItems;
                          view.refresh(view.CHANGED_INITIAL_ARRAY);
                      }
                  }
              }
  
              if (this._data.displayOptions) {
                  this._calcRowCols(this._data.displayOptions.flowOrientation, this._data.numberOfRows, this._data.numberOfColumns, numberOfItems);
              }
  
          }