Package org.exoplatform.webui.core

Examples of org.exoplatform.webui.core.UIPopupWindow


         PageNavigation persistNavigation =  dataService.getPageNavigation(editedOwnerType, editedOwnerId);
         if (persistNavigation == null)
         {
            UIApplication uiApp = Util.getPortalRequestContext().getUIApplication();
            uiApp.addMessage(new ApplicationMessage("UINavigationManagement.msg.NavigationNotExistAnymore", null));
            UIPopupWindow uiPopup = uiManagement.getParent();
            uiPopup.setShow(false);
            UIPortalApplication uiPortalApp = (UIPortalApplication)prContext.getUIApplication();
            UIWorkingWorkspace uiWorkingWS = uiPortalApp.getChildById(UIPortalApplication.UI_WORKING_WS_ID);
            prContext.addUIComponentToUpdateByAjax(uiWorkingWS);
            prContext.setFullRender(true);
            return;
         }
        
         if(PortalConfig.PORTAL_TYPE.equals(navigation.getOwnerType()))
         {
            UserPortalConfig portalConfig = portalConfigService.getUserPortalConfig(navigation.getOwnerId(), prContext.getRemoteUser());
            if(portalConfig != null)
            {
               dataService.save(navigation);
            }
            else
            {
               UIApplication uiApp = Util.getPortalRequestContext().getUIApplication();
               uiApp.addMessage(new ApplicationMessage("UIPortalForm.msg.notExistAnymore", null));
               UIPopupWindow uiPopup = uiManagement.getParent();
               uiPopup.setShow(false);
               UIPortalApplication uiPortalApp = (UIPortalApplication)prContext.getUIApplication();
               UIWorkingWorkspace uiWorkingWS = uiPortalApp.getChildById(UIPortalApplication.UI_WORKING_WS_ID);
               prContext.addUIComponentToUpdateByAjax(uiWorkingWS);
               prContext.setFullRender(true);
               return;
            }
         }
         else
         {
            dataService.save(navigation);
         }

         // Reload navigation here as some navigation could exist in the back end such as system navigations
         // that would not be in the current edited UI navigation
         navigation = dataService.getPageNavigation(navigation.getOwnerType(), navigation.getOwnerId());

         UIPortalApplication uiPortalApp = Util.getUIPortalApplication();
         setNavigation(uiPortalApp.getNavigations(), navigation);

         // Need to relocalize as it was loaded from storage
         uiPortalApp.localizeNavigations();
        
         //Update UIPortal corredponding to edited navigation
         UIPortal targetedUIPortal = uiPortalApp.getCachedUIPortal(editedOwnerType, editedOwnerId);
         if(targetedUIPortal != null)
         {
            targetedUIPortal.setNavigation(navigation);
         }
        
         UIPopupWindow uiPopup = uiManagement.getParent();
         uiPopup.setShow(false);
         UIWorkingWorkspace uiWorkingWS = uiPortalApp.getChildById(UIPortalApplication.UI_WORKING_WS_ID);
         prContext.addUIComponentToUpdateByAjax(uiWorkingWS);
         prContext.setFullRender(true);
      }
View Full Code Here


      @Override
      public void execute(Event<UINavigationManagement> event) throws Exception
      {
         UINavigationManagement uiManagement = event.getSource();
         UINavigationNodeSelector uiNodeSelector = uiManagement.getChild(UINavigationNodeSelector.class);
         UIPopupWindow uiManagementPopup = uiNodeSelector.getAncestorOfType(UIPopupWindow.class);
         UIPageNodeForm2 uiNodeForm = uiManagementPopup.createUIComponent(UIPageNodeForm2.class, null, null);
         uiNodeForm.setValues(null);
         uiManagementPopup.setUIComponent(uiNodeForm);
         PageNavigation nav = uiNodeSelector.getSelectedNavigation();
         uiNodeForm.setSelectedParent(nav);

         // set owner type, owner
         uiNodeForm.setOwner(nav.getOwnerId());
         uiNodeForm.setOwnerType(nav.getOwnerType());

         uiManagementPopup.setWindowSize(800, 500);
         event.getRequestContext().addUIComponentToUpdateByAjax(uiManagementPopup.getParent());
      }
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();

            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

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

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

            event.getRequestContext().addUIComponentToUpdateByAjax(uiPopup);// TODO: Update relevant tab panes
        }
View Full Code Here

   static public class CloseActionListener extends EventListener<UIPopupWindow>
   {
      public void execute(Event<UIPopupWindow> event) throws Exception
      {
         UIPopupWindow uiPopupWindow = event.getSource();
         UIForm uiForm = uiPopupWindow.getAncestorOfType(UIForm.class);
         uiPopupWindow.setShow(false);
         event.getRequestContext().addUIComponentToUpdateByAjax(uiForm.getParent());
      }
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

         UITree uicom = event.getSource();
         uiSelector = uicom.getParent();
         uiSelector.changeGroup(groupId);

         UIForm uiForm = uiSelector.getAncestorOfType(UIForm.class);
         UIPopupWindow uiPopup = uiSelector.getParent();
         uiPopup.setShow(true);
         if (uiForm != null)
         {
            event.getRequestContext().addUIComponentToUpdateByAjax(uiForm.getParent());
         }
         else
View Full Code Here

         uiBreadcumbs.setSelectPath(objectId);
         String selectGroupId = uiBreadcumbs.getSelectLocalPath().getId();
         uiSelector.changeGroup(selectGroupId);

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

   {
      public void execute(Event<UIGroupSelector> event) throws Exception
      {
         UIGroupSelector uiSelector = event.getSource();

         UIPopupWindow uiPopup = uiSelector.getParent();
         uiPopup.setShow(false);
         UIForm uiForm = event.getSource().getAncestorOfType(UIForm.class);
         if (uiForm != null)
         {
            event.getRequestContext().addUIComponentToUpdateByAjax(uiForm.getParent());
            uiForm.broadcast(event, event.getExecutionPhase());
         }
         else
         {
            event.getRequestContext().addUIComponentToUpdateByAjax(uiPopup);
            UIComponent uiParent = uiPopup.getParent();
            uiParent.broadcast(event, event.getExecutionPhase());
         }

      }
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.