/** * Replace this model's list with the specified list. * * <p> * The wrapped list should no longer be modified as the data provider cannot * detect changes to the wrapped list. Instead, call {@link #getList()} to * retrieve a wrapper that can be modified and will correctly forward changes * to displays. * * @param listToWrap the model's new list * * @see #getList() */ public void setList(List<T> listToWrap) { listWrapper = new ListWrapper(listToWrap); listWrapper.minModified = 0; listWrapper.maxModified = listWrapper.size(); listWrapper.modified = true; flush(); }
/** * Replace this model's list with the specified list. * * <p> * The wrapped list should no longer be modified as the data provider cannot * detect changes to the wrapped list. Instead, call {@link #getList()} to * retrieve a wrapper that can be modified and will correctly forward changes * to displays. * * @param listToWrap the model's new list * * @see #getList() */ public void setList(List<T> listToWrap) { listWrapper = new ListWrapper(listToWrap); listWrapper.minModified = 0; listWrapper.maxModified = listWrapper.size(); listWrapper.modified = true; flush(); }
@Override protected void onRangeChanged(HasData<T> display) { int size = listWrapper.size(); if (size > 0) { // Do not push data if the data set is empty. updateRowData(display, 0, listWrapper); } } }
@Override protected void onRangeChanged(HasData<T> display) { int size = listWrapper.size(); if (size > 0) { // Do not push data if the data set is empty. updateRowData(display, 0, listWrapper); } } }
/** * Replace this model's list with the specified list. * * <p> * The wrapped list should no longer be modified as the data provider cannot * detect changes to the wrapped list. Instead, call {@link #getList()} to * retrieve a wrapper that can be modified and will correctly forward changes * to displays. * * @param listToWrap the model's new list * * @see #getList() */ public void setList(List<T> listToWrap) { listWrapper = new ListWrapper(listToWrap); listWrapper.minModified = 0; listWrapper.maxModified = listWrapper.size(); listWrapper.modified = true; flush(); }
@Override protected void onRangeChanged(HasData<T> display) { int size = listWrapper.size(); if (size > 0) { // Do not push data if the data set is empty. updateRowData(display, 0, listWrapper); } } }