use of io.jmix.ui.component.pagination.data.PaginationEmptyBinder in project jmix by jmix-framework.
the class AbstractDataGrid method setupPaginationDataSourceProvider.
public void setupPaginationDataSourceProvider() {
if (pagination == null) {
return;
}
DataUnit items = getItems();
PaginationDataBinder provider;
if (items instanceof ContainerDataUnit) {
provider = applicationContext.getBean(PaginationDataUnitBinder.class, items);
} else if (items instanceof EmptyDataUnit && items instanceof EntityDataUnit) {
provider = new PaginationEmptyBinder(((EntityDataUnit) items).getEntityMetaClass());
} else {
throw new IllegalStateException("Unsupported data unit type: " + items);
}
pagination.setDataBinder(provider);
}
use of io.jmix.ui.component.pagination.data.PaginationEmptyBinder in project jmix by jmix-framework.
the class AbstractTable method setupPaginationDataSourceProvider.
public void setupPaginationDataSourceProvider() {
if (pagination == null) {
return;
}
DataUnit items = getItems();
PaginationDataBinder provider;
if (items instanceof ContainerDataUnit) {
provider = applicationContext.getBean(PaginationDataUnitBinder.class, items);
} else if (items instanceof EmptyDataUnit && items instanceof EntityDataUnit) {
provider = new PaginationEmptyBinder(((EntityDataUnit) items).getEntityMetaClass());
} else {
throw new IllegalStateException("Unsupported data unit type: " + items);
}
pagination.setDataBinder(provider);
}
Aggregations