public void execute(Event<UIUserSelector> event) throws Exception { UIUserSelector uiForm = event.getSource(); UIPermissionManagerBase uiParent = uiForm.getAncestorOfType(UIPermissionManagerBase.class); UIPermissionFormBase uiPermissionForm = uiParent.getChild(UIPermissionFormBase.class); uiPermissionForm.doSelect(UIPermissionInputSet.FIELD_USERORGROUP, uiForm.getSelectedUsers()); UIPopupWindow uiPopup = uiParent.getChild(UIPopupWindow.class); uiPopup.setUIComponent(null); uiPopup.setShow(false); event.getRequestContext().addUIComponentToUpdateByAjax(uiParent); }
public void execute(Event<UIUserContainer> event) throws Exception { UIUserContainer uiUserContainer = event.getSource(); UIUserSelector uiUserSelector = uiUserContainer.getChild(UIUserSelector.class); UIPermissionManager uiParent = uiUserContainer.getAncestorOfType(UIPermissionManager.class); UIPermissionForm uiPermissionForm = uiParent.getChild(UIPermissionForm.class); uiPermissionForm.doSelect( UIPermissionInputSet.FIELD_USERORGROUP, uiUserSelector.getSelectedUsers()); UIPopupWindow uiPopup = uiParent.findComponentById("PopupUserSelector"); uiPopup.setShow(false); event.getRequestContext().addUIComponentToUpdateByAjax(uiParent); }