use of org.activiti.explorer.ui.event.ConfirmationEvent in project Activiti by Activiti.
the class UserDetailPanel method initDeleteButton.
protected void initDeleteButton(VerticalLayout actionLayout) {
Button deleteButton = new Button(i18nManager.getMessage(Messages.USER_DELETE));
deleteButton.addStyleName(Reindeer.BUTTON_SMALL);
actionLayout.addComponent(deleteButton);
deleteButton.addListener(new ClickListener() {
public void buttonClick(ClickEvent event) {
ConfirmationDialogPopupWindow confirmPopup = new ConfirmationDialogPopupWindow(i18nManager.getMessage(Messages.USER_CONFIRM_DELETE, user.getId()));
confirmPopup.addListener(new ConfirmationEventListener() {
protected void rejected(ConfirmationEvent event) {
}
protected void confirmed(ConfirmationEvent event) {
// Delete user from database
identityService.deleteUser(user.getId());
// Update ui
userPage.refreshSelectNext();
}
});
ExplorerApp.get().getViewManager().showPopupWindow(confirmPopup);
}
});
}
use of org.activiti.explorer.ui.event.ConfirmationEvent in project Activiti by Activiti.
the class RemoveInvolvedPersonListener method buttonClick.
public void buttonClick(ClickEvent event) {
User user = identityService.createUserQuery().userId(identityLink.getUserId()).singleResult();
String name = user.getFirstName() + " " + user.getLastName();
ConfirmationDialogPopupWindow confirmationPopup = new ConfirmationDialogPopupWindow(i18nManager.getMessage(Messages.TASK_INVOLVED_REMOVE_CONFIRMATION_TITLE, name), i18nManager.getMessage(Messages.TASK_INVOLVED_REMOVE_CONFIRMATION_DESCRIPTION, name, task.getName()));
confirmationPopup.addListener(new ConfirmationEventListener() {
private static final long serialVersionUID = 1L;
protected void rejected(ConfirmationEvent event) {
}
protected void confirmed(ConfirmationEvent event) {
taskService.deleteUserIdentityLink(identityLink.getTaskId(), identityLink.getUserId(), identityLink.getType());
taskDetailPanel.notifyPeopleInvolvedChanged();
}
});
viewManager.showPopupWindow(confirmationPopup);
}
Aggregations