@Override public void setLookupComponentMultiSelect(boolean multiSelect) { LookupComponent<T> lookupComponent = getLookupComponent(); if (lookupComponent instanceof Table) { ((Table<T>) lookupComponent).setMultiSelect(multiSelect); } else if (lookupComponent instanceof DataGrid) { ((DataGrid<T>) lookupComponent).setSelectionMode(multiSelect ? DataGrid.SelectionMode.MULTI : DataGrid.SelectionMode.SINGLE); } else if (lookupComponent instanceof Tree) { ((Tree<T>) lookupComponent).setSelectionMode(multiSelect ? Tree.SelectionMode.MULTI : Tree.SelectionMode.SINGLE); } } }
@Override public void init(Map<String, Object> params) { if (WindowParams.MULTI_SELECT.getBool(getContext())) { usersTable.setMultiSelect(true); } RemoveAction removeAction = new UserRemoveAction(usersTable, userManagementService); usersTable.addAction(removeAction); } }
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(); }
((Table) lookupComponent).setMultiSelect(true);
resultComponent.setMultiSelect(Boolean.parseBoolean(multiselect));
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; }
rolesTable.setMultiSelect(true);
table.setMultiSelect(true); table.setFrame(frame);
entitiesTable.setMultiSelect(true); Action restoreAction = new ItemTrackingAction("restore") .withCaption(getMessage("entityRestore.restore"))
entitiesTable.setMultiSelect(true);
usersTable.setMultiSelect(true);