use of org.activiti.explorer.ui.event.SubmitEvent in project Activiti by Activiti.
the class SelectUsersPopupWindow method initSelectMyselfButton.
protected void initSelectMyselfButton(HorizontalLayout searchLayout) {
final LoggedInUser loggedInUser = ExplorerApp.get().getLoggedInUser();
if (ignoredUserIds == null || !ignoredUserIds.contains(loggedInUser.getId())) {
Button meButton = new Button(i18nManager.getMessage(Messages.PEOPLE_SELECT_MYSELF));
meButton.setIcon(Images.USER_16);
searchLayout.addComponent(meButton);
searchLayout.setComponentAlignment(meButton, Alignment.MIDDLE_LEFT);
if (multiSelect) {
meButton.addListener(new ClickListener() {
public void buttonClick(ClickEvent event) {
selectUser(loggedInUser.getId(), loggedInUser.getFullName());
}
});
} else {
meButton.addListener(new ClickListener() {
public void buttonClick(ClickEvent event) {
addMatchingUser(loggedInUser.getId(), loggedInUser.getFullName());
matchingUsersTable.select(loggedInUser.getId());
fireEvent(new SubmitEvent(doneButton, SubmitEvent.SUBMITTED));
close();
}
});
}
}
}
use of org.activiti.explorer.ui.event.SubmitEvent in project Activiti by Activiti.
the class SelectUsersPopupWindow method initDoneButton.
protected void initDoneButton() {
doneButton = new Button("Done");
doneButton.addListener(new ClickListener() {
public void buttonClick(ClickEvent event) {
// Fire event such that depending UI's can be updated
fireEvent(new SubmitEvent(doneButton, SubmitEvent.SUBMITTED));
// close popup window
close();
}
});
addComponent(doneButton);
windowLayout.setComponentAlignment(doneButton, Alignment.MIDDLE_RIGHT);
}
Aggregations