use of io.jmix.ui.component.data.table.ContainerGroupTableItems in project jmix by jmix-framework.
the class ShowReportTableScreen method createTable.
protected Table createTable(String dataSetName, KeyValueCollectionContainer collectionContainer, Map<String, Set<JmixTableData.ColumnInfo>> headerMap) {
Table table = uiComponents.create(GroupTable.class);
table.setId(dataSetName + "Table");
Set<JmixTableData.ColumnInfo> headers = headerMap.get(dataSetName);
createColumns(collectionContainer, table, headers);
table.setItems(new ContainerGroupTableItems(collectionContainer));
table.setWidth("100%");
table.setMultiSelect(true);
table.setColumnControlVisible(false);
table.setColumnReorderingAllowed(false);
Action excelExportAction = actions.create(ExcelExportAction.ID);
Button excelButton = uiComponents.create(Button.class);
excelButton.setAction(excelExportAction);
ButtonsPanel buttonsPanel = uiComponents.create(ButtonsPanel.class);
table.setButtonsPanel(buttonsPanel);
table.addAction(excelExportAction);
buttonsPanel.add(excelButton);
return table;
}
Aggregations