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