Search in sources :

Example 1 with ContainerGroupTableItems

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;
}
Also used : Action(io.jmix.ui.action.Action) ExcelExportAction(io.jmix.uiexport.action.ExcelExportAction) ContainerGroupTableItems(io.jmix.ui.component.data.table.ContainerGroupTableItems)

Aggregations

Action (io.jmix.ui.action.Action)1 ContainerGroupTableItems (io.jmix.ui.component.data.table.ContainerGroupTableItems)1 ExcelExportAction (io.jmix.uiexport.action.ExcelExportAction)1