Package org.exoplatform.webui.core

Examples of org.exoplatform.webui.core.UIPopupWindow


   {
      public void execute(Event<UIListUsers> event) throws Exception
      {
         UIListUsers uiListUser = event.getSource();
         String userName = event.getRequestContext().getRequestParameter(OBJECTID);
         UIPopupWindow popup = uiListUser.getAncestorOfType(UIPopupWindow.class);
         popup.setShow(false);
         UIGroupMembershipForm groupMembershipForm = popup.getParent();
         groupMembershipForm.setUserName(userName);
         event.getRequestContext().addUIComponentToUpdateByAjax(groupMembershipForm);
      }
View Full Code Here


   {
      public void execute(Event<UIGroupEditMembershipForm> event) throws Exception
      {
         UIGroupEditMembershipForm uiForm = event.getSource();
         UIApplication uiApp = event.getRequestContext().getUIApplication();
         UIPopupWindow uiPopup = uiForm.getParent();
         OrganizationService service = uiForm.getApplicationComponent(OrganizationService.class);
        
         Membership formMembership =  service.getMembershipHandler().findMembership(uiForm.membershipId);
         if (formMembership == null)
         {
            uiApp.addMessage(new ApplicationMessage("UIGroupEditMembershipForm.msg.membership-delete", null));
            uiPopup.setUIComponent(null);
            uiPopup.setShow(false);
            return;
         }
         String userName = formMembership.getUserName();
         Group group = service.getGroupHandler().findGroupById(uiForm.groupId);
         User user = service.getUserHandler().findUserByName(userName);
         MembershipHandler memberShipHandler = service.getMembershipHandler();
         String memberShipTypeStr = uiForm.getUIFormSelectBox(MEMBER_SHIP).getValue();
         MembershipType membershipType = service.getMembershipTypeHandler().findMembershipType(memberShipTypeStr);
         Membership membership =
            memberShipHandler.findMembershipByUserGroupAndType(userName, group.getId(), membershipType.getName());
         if (membership != null)
         {
            uiApp.addMessage(new ApplicationMessage("UIGroupEditMembershipForm.msg.membership-exist", null));
            return;
         }
         memberShipHandler.removeMembership(uiForm.membershipId, true);
         memberShipHandler.linkMembership(user, group, membershipType, true);

         uiPopup.setUIComponent(null);
         uiPopup.setShow(false);
      }
View Full Code Here

   static public class CancelActionListener extends EventListener<UIGroupEditMembershipForm>
   {
      public void execute(Event<UIGroupEditMembershipForm> event) throws Exception
      {
         UIGroupEditMembershipForm uiForm = event.getSource();
         UIPopupWindow uiPopup = uiForm.getParent();
         uiPopup.setUIComponent(null);
         uiPopup.setShow(false);
      }
View Full Code Here

   private UIGadget maximizedGadget;

   public UIDashboard() throws Exception
   {
      UIPopupWindow popup = addChild(UIPopupWindow.class, null, GADGET_POPUP_ID + "-" + hashCode());
      popup.setUIComponent(createUIComponent(UIDashboardSelectContainer.class, null, null));
      addChild(UIDashboardContainer.class, null, null);
   }
View Full Code Here

    }

    public static class CloseActionListener extends UIFormPopupWindow.CloseActionListener {
        @Override
        public void execute(Event<UIPopupWindow> event) throws Exception {
            UIPopupWindow popWindow = event.getSource();
            popWindow.setUIComponent(null);
            super.execute(event);
        }
View Full Code Here

        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);

        }
View Full Code Here

            String objectId = event.getRequestContext().getRequestParameter(OBJECTID);
            uiBreadcumbs.setSelectPath(objectId);
            String selectGroupId = uiBreadcumbs.getSelectLocalPath().getId();
            uiSelector.changeGroup(selectGroupId);

            UIPopupWindow uiPopup = uiSelector.getParent();
            uiPopup.setShow(true);

            UIForm uiForm = event.getSource().getAncestorOfType(UIForm.class);
            if (uiForm != null) {
                event.getRequestContext().addUIComponentToUpdateByAjax(uiForm.getParent());
            } else {
View Full Code Here

        uiIterator_ = new UIPageIterator();
        uiIterator_.setPageList(objPageList);
        uiIterator_.setId("UISelectUserPage");

        // create group selector
        UIPopupWindow uiPopup = addChild(UIPopupWindow.class, null, "UIPopupGroupSelector");
        uiPopup.setWindowSize(540, 0);
        UIGroupSelector uiGroup = createUIComponent(UIGroupSelector.class, null, null);
        uiPopup.setUIComponent(uiGroup);
        uiGroup.setId("GroupSelector");
        uiGroup.getChild(UITree.class).setId("TreeGroupSelector");
        uiGroup.getChild(UIBreadcumbs.class).setId("BreadcumbsGroupSelector");
    }
View Full Code Here

            UIGroupMembershipSelector uiSelector = uiComp.getParent();
            uiSelector.changeGroup(groupId);
            UIComponent uiPermission = uiSelector.<UIComponent> getParent().getParent();
            uiPermission.setRenderSibling(uiPermission.getClass());
            uiPermission.broadcast(event, Event.Phase.PROCESS);
            UIPopupWindow uiPopup = uiSelector.getParent();
            uiPopup.setShow(true);
            event.getRequestContext().addUIComponentToUpdateByAjax(uiPopup);// TODO: Update relevant tab panes
        }
View Full Code Here

            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);

        }
View Full Code Here

TOP

Related Classes of org.exoplatform.webui.core.UIPopupWindow

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.