protected void initTable() { entitiesTable = uiComponents.create(Table.class); entitiesTable.setId("table"); entitiesTable.setDatasource(entitiesDs); entitiesTable.setSizeFull(); Boolean multiSelect = WindowParams.MULTI_SELECT.get(getContext()); entitiesTable.setMultiSelect(multiSelect != null ? multiSelect : true); RowsCount rowsCount = uiComponents.create(RowsCount.class); rowsCount.setRowsCountTarget(entitiesTable); entitiesTable.setRowsCount(rowsCount); entitiesTable.focus(); }
protected Table createTable(String dataSetName, GroupDatasource dataSource) { Table table = componentsFactory.createComponent(GroupTable.class); table.setId(dataSetName + "Table"); createColumns(dataSource, table); table.setDatasource(dataSource); table.setWidth("100%"); table.setMultiSelect(true); ExcelAction excelAction = ExcelAction.create(table); excelAction.setFileName(dataSetName); Button excelButton = componentsFactory.createComponent(Button.class); excelButton.setAction(excelAction); ButtonsPanel buttonsPanel = componentsFactory.createComponent(ButtonsPanel.class); table.setButtonsPanel(buttonsPanel); table.addAction(excelAction); buttonsPanel.add(excelButton); return table; }