Пример #1
0
 public void execute(Event<UIUserInGroup> event) throws Exception {
   UIUserInGroup uiUserInGroup = event.getSource();
   String id = event.getRequestContext().getRequestParameter(OBJECTID);
   OrganizationService service =
       uiUserInGroup.getApplicationComponent(OrganizationService.class);
   MembershipHandler handler = service.getMembershipHandler();
   handler.removeMembership(id, true);
   uiUserInGroup.refresh();
   event
       .getRequestContext()
       .addUIComponentToUpdateByAjax(uiUserInGroup.getChild(UIGridUser.class));
 }
Пример #2
0
 public void execute(Event<UIUserInGroup> event) throws Exception {
   UIUserInGroup uiUserInGroup = event.getSource();
   String id = event.getRequestContext().getRequestParameter(OBJECTID);
   OrganizationService service =
       uiUserInGroup.getApplicationComponent(OrganizationService.class);
   MembershipHandler handler = service.getMembershipHandler();
   UIPopupWindow uiPopup = uiUserInGroup.getChild(UIPopupWindow.class);
   UIGroupEditMembershipForm uiEditMemberShip =
       uiUserInGroup.createUIComponent(UIGroupEditMembershipForm.class, null, null);
   uiEditMemberShip.setValue(handler.findMembership(id), uiUserInGroup.getSelectedGroup());
   uiPopup.setUIComponent(uiEditMemberShip);
   uiPopup.setShow(true);
 }