Search in sources :

Example 6 with ConfirmationEventListener

use of org.activiti.explorer.ui.event.ConfirmationEventListener 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);
}
Also used : ConfirmationEventListener(org.activiti.explorer.ui.event.ConfirmationEventListener) User(org.activiti.engine.identity.User) ConfirmationEvent(org.activiti.explorer.ui.event.ConfirmationEvent) ConfirmationDialogPopupWindow(org.activiti.explorer.ui.custom.ConfirmationDialogPopupWindow)

Aggregations

ConfirmationDialogPopupWindow (org.activiti.explorer.ui.custom.ConfirmationDialogPopupWindow)6 ConfirmationEvent (org.activiti.explorer.ui.event.ConfirmationEvent)6 ConfirmationEventListener (org.activiti.explorer.ui.event.ConfirmationEventListener)6 I18nManager (org.activiti.explorer.I18nManager)3 ViewManager (org.activiti.explorer.ViewManager)3 Button (com.vaadin.ui.Button)2 ClickEvent (com.vaadin.ui.Button.ClickEvent)2 ClickListener (com.vaadin.ui.Button.ClickListener)2 RuntimeService (org.activiti.engine.RuntimeService)1 TaskService (org.activiti.engine.TaskService)1 User (org.activiti.engine.identity.User)1