use of com.haulmont.cuba.gui.components.data.table.DatasourceTableItems in project cuba by cuba-platform.
the class Table method setDatasource.
/**
* @param datasource datasource
* @deprecated Use {@link #setItems(TableItems)} instead
*/
@Deprecated
default void setDatasource(CollectionDatasource datasource) {
if (datasource == null) {
setItems(null);
} else {
TableItems<E> tableItems;
if (datasource instanceof CollectionDatasource.Sortable) {
tableItems = new SortableDatasourceTableItems((CollectionDatasource.Sortable) datasource);
} else {
tableItems = new DatasourceTableItems(datasource);
}
setItems(tableItems);
}
}
Aggregations