Пример #1
0
 public void onEvent(Event<UICategoryForm> event, UICategoryForm categoryForm, String objectId)
     throws Exception {
   ;
   String[] objects = objectId.split(ForumUtils.COMMA);
   String type = objects[0];
   String param = objects[1];
   UIPopupContainer popupContainer = categoryForm.getAncestorOfType(UIPopupContainer.class);
   UIUserSelect uiUserSelect = popupContainer.findFirstComponentOfType(UIUserSelect.class);
   if (uiUserSelect != null) {
     UIPopupWindow popupWindow = uiUserSelect.getParent();
     closePopupWindow(popupWindow);
   }
   UIGroupSelector uiGroupSelector = null;
   if (type.equals(UIGroupSelector.TYPE_MEMBERSHIP)) {
     uiGroupSelector =
         openPopup(popupContainer, UIGroupSelector.class, "UIMemberShipSelector", 600, 0);
   } else if (type.equals(UIGroupSelector.TYPE_GROUP)) {
     uiGroupSelector = openPopup(popupContainer, UIGroupSelector.class, "GroupSelector", 600, 0);
   }
   uiGroupSelector.getAncestorOfType(UIPopupWindow.class).setRendered(true);
   uiGroupSelector.setType(type);
   uiGroupSelector.setSpaceGroupId(
       categoryForm.getAncestorOfType(UIForumPortlet.class).getSpaceGroupId());
   uiGroupSelector.setComponent(categoryForm, new String[] {param});
   uiGroupSelector.getChild(UITree.class).setId(UIGroupSelector.TREE_GROUP_ID);
   uiGroupSelector
       .getChild(org.exoplatform.webui.core.UIBreadcumbs.class)
       .setId(UIGroupSelector.BREADCUMB_GROUP_ID);
 }