}
public static class SelectGroupActionListener extends EventListener<UIGroupSelector> {
public void execute(Event<UIGroupSelector> event) throws Exception {
UIGroupSelector uiSelector = event.getSource();
UIComponent uiPermission = uiSelector.<UIComponent> getParent().getParent();
WebuiRequestContext pcontext = event.getRequestContext();
UIPopupWindow uiPopup = uiSelector.getParent();
UIForm uiForm = event.getSource().getAncestorOfType(UIForm.class);
if (uiForm != null) {
event.getRequestContext().addUIComponentToUpdateByAjax(uiForm.getParent());
} else {
event.getRequestContext().addUIComponentToUpdateByAjax(uiPopup);
}
if (uiSelector.getCurrentGroup() == null) {
UIApplication uiApp = pcontext.getUIApplication();
uiApp.addMessage(new ApplicationMessage("UIGroupSelector.msg.selectGroup", null));
uiPopup.setShow(true);
return;
}
uiPermission.broadcast(event, event.getExecutionPhase());
uiPopup.setShow(false);
}