protected void initMoveButtons() { Action moveUpAction = new ItemTrackingAction("moveUp") .withCaption("") .withHandler(event -> { Set<CategoryAttribute> selected = categoryAttrsTable.getSelected(); if (selected.isEmpty()) .withHandler(event -> { Set<CategoryAttribute> selected = categoryAttrsTable.getSelected(); if (selected.isEmpty())
protected void initUsersTableActions() { userCreateAction = new GroupPropertyCreateAction(usersTable); userCreateAction.setAfterCommitHandler(entity -> usersTable.getDatasource().refresh() ); usersTable.addAction(userCreateAction); usersTable.addAction(new UserRemoveAction(usersTable, userManagementService)); Action moveToGroupAction = new ItemTrackingAction("moveToGroup") .withIcon("icons/move.png") .withCaption(getMessage("moveToGroup")) .withHandler(event -> { Set<User> selected = usersTable.getSelected(); if (!selected.isEmpty()) { moveUsersToGroup(selected); } }); moveToGroupAction.setEnabled(security.isEntityOpPermitted(User.class, EntityOp.UPDATE)); usersTable.addAction(moveToGroupAction); }
.withHandler(event -> { userManagementService.copyRole(rolesTable.getSingleSelected().getId()); rolesDs.refresh(); .withHandler(event -> { Set<Role> selected = rolesTable.getSelected(); if (selected.isEmpty()) {
.withHandler(event -> { FileDescriptor fileDescriptor = filesTable.getSingleSelected(); if (fileDescriptor != null) {
.withCaption(getMessage("entityRestore.restore")) .withPrimary(true) .withHandler(event -> showRestoreDialog() );
.withHandler(event -> { Report report = reportsTable.getSingleSelected(); if (report != null) { .withHandler(event -> { Report report = reportsTable.getSingleSelected(); if (report != null) {
.withCaption(getMessage("actions.constraint.moveToGroup")) .withIcon("icons/move.png") .withHandler(e -> moveConstraintToGroup(constraintsTable.getSingleSelected()) );
@Override public void init(Map<String, Object> params) { super.init(params); List<Report> reports = reportsParameter; if (reports == null) { reports = reportGuiManager.getAvailableReports(screenParameter, userSessionSource.getUserSession().getUser(), null); } if (reportsParameter != null) { gridFilter.setVisible(false); } for (Report report : reports) { reportDs.includeItem(report); } Action runAction = new ItemTrackingAction(RUN_ACTION_ID) .withCaption(getMessage("runReport")) .withHandler(e -> { Report report = reportsTable.getSingleSelected(); if (report != null) { report = getDsContext().getDataSupplier().reload(report, ReportService.MAIN_VIEW_NAME); reportGuiManager.runReport(report, ReportRun.this); } }); reportsTable.addAction(runAction); reportsTable.setItemClickAction(runAction); addAction(new BaseAction("applyFilter") .withShortcut(clientConfig.getFilterApplyShortcut()) .withHandler(e -> { filterReports(); })); }
.withHandler(event -> { Set<ManagedBeanInfo> selected = mbeansTable.getSelected(); if (!selected.isEmpty()) {