The dataprovider holds your model.
Whenever you change your model (for instance, a list of object mapped to your cellTable), it will be in charge of updating the display.
It acts as a controller between your display (the cellTable) and the model (i.e. a list of objects, typically a list of shared objects coming from your back-end).
Here is an example with a listdataprovider:
@UiField(provided = true)
protected CellTable<TableRowDataShared> cellTable;
protected ListDataProvider<TableRowDataShared> dataProvider = new ListDataProvider<TableRowDataShared>();
public void init() {
dataProvider.addDataDisplay(cellTable);
// init your cellTable here...
}
public void onModelUpdate(List<TableRowDataShared> newData) {
dataProvider.getList().clear();
dataProvider.getList().addAll(newData);
dataProvider.flush();
dataProvider.refresh();
cellTable.redraw();
}