Examples of UIPortalApplication


Examples of org.exoplatform.portal.webui.workspace.UIPortalApplication

      }
   }
  
   private boolean hasEditPermissionOnPortal() throws Exception
   {
      UIPortalApplication portalApp = Util.getUIPortalApplication();
      UIPortal currentUIPortal = portalApp.<UIWorkingWorkspace>findComponentById(UIPortalApplication.UI_WORKING_WS_ID).findFirstComponentOfType(UIPortal.class);
      UserACL userACL = portalApp.getApplicationComponent(UserACL.class);
      return userACL.hasEditPermissionOnPortal(currentUIPortal.getOwnerType(), currentUIPortal.getOwner(), currentUIPortal.getEditPermission());
   }
View Full Code Here

Examples of org.exoplatform.portal.webui.workspace.UIPortalApplication

      return userACL.hasEditPermissionOnPortal(currentUIPortal.getOwnerType(), currentUIPortal.getOwner(), currentUIPortal.getEditPermission());
   }

   private boolean hasEditPermissionOnPage() throws Exception
   {
      UIPortalApplication portalApp = Util.getUIPortalApplication();
      UIWorkingWorkspace uiWorkingWS = portalApp.getChildById(UIPortalApplication.UI_WORKING_WS_ID);
      UIPageBody pageBody = uiWorkingWS.findFirstComponentOfType(UIPageBody.class);
      UIPage uiPage = (UIPage)pageBody.getUIComponent();
      UserACL userACL = portalApp.getApplicationComponent(UserACL.class);

      if(uiPage != null)
      {
         return userACL.hasEditPermissionOnPage(uiPage.getOwnerType(), uiPage.getOwnerId(), uiPage.getEditPermission());
      }
      else
      {
         UIPortal currentUIPortal = portalApp.<UIWorkingWorkspace>findComponentById(UIPortalApplication.UI_WORKING_WS_ID).findFirstComponentOfType(UIPortal.class);
         PageNode currentNode = currentUIPortal.getSelectedNode();
         String pageReference = currentNode.getPageReference();
         if(pageReference == null)
         {
            return false;
         }
         else
         {
            DataStorage dataStorage = portalApp.getApplicationComponent(DataStorage.class);
            Page page = dataStorage.getPage(pageReference);
            if(page == null)
            {
               return false;
            }
View Full Code Here

Examples of org.exoplatform.portal.webui.workspace.UIPortalApplication

         UIDashboardContainer uiDashboardCont = uiDashboard.getChild(UIDashboardContainer.class);
         UIGadget uiGadget = uiDashboard.getChild(UIDashboardContainer.class).getUIGadget(objectId);
         if (uiGadget.isLossData())
         {
            UIPortalApplication uiApp = Util.getUIPortalApplication();
            uiApp.addMessage(new ApplicationMessage("UIDashboard.msg.ApplicationNotExisted", null));
            uiDashboardCont.removeUIGadget(uiGadget.getId());
            context.addUIComponentToUpdateByAjax(uiDashboard);
         }
         else
         {
View Full Code Here

Examples of org.exoplatform.portal.webui.workspace.UIPortalApplication

         String maximize = context.getRequestParameter("maximize");
         UIDashboardContainer uiDashboardCont = uiDashboard.getChild(UIDashboardContainer.class);
         UIGadget uiGadget = uiDashboardCont.getUIGadget(objectId);
         if (uiGadget == null || uiGadget.isLossData())
         {
            UIPortalApplication uiApp = Util.getUIPortalApplication();
            uiApp.addMessage(new ApplicationMessage("UIDashboard.msg.ApplicationNotExisted", null));
            if (uiGadget != null)
               uiDashboardCont.removeUIGadget(uiGadget.getId());
            uiDashboardCont.save();
            context.addUIComponentToUpdateByAjax(uiDashboard);
            return;
View Full Code Here

Examples of org.exoplatform.portal.webui.workspace.UIPortalApplication

    public static class EditPortalPropertiesActionListener extends EventListener<UIPortal> {
        public void execute(Event<UIPortal> event) throws Exception {
            String portalName = event.getRequestContext().getRequestParameter("portalName");
            UIPortal uiPortal = Util.getUIPortal();
            UIPortalApplication uiApp = uiPortal.getAncestorOfType(UIPortalApplication.class);
            UserPortalConfigService service = uiApp.getApplicationComponent(UserPortalConfigService.class);
            PortalRequestContext context = Util.getPortalRequestContext();
            if (portalName != null
                    && service.getUserPortalConfig(portalName, event.getRequestContext().getRemoteUser()) == null) {
                uiApp.addMessage(new ApplicationMessage("UISiteManagement.msg.portal-not-exist", new String[] { portalName }));
                context.addUIComponentToUpdateByAjax(uiApp.findFirstComponentOfType(UIWorkingWorkspace.class));
                context.setFullRender(true);
                return;
            }

            UIMaskWorkspace uiMaskWS = uiApp.getChildById(UIPortalApplication.UI_MASK_WS_ID);
            UIPortalForm portalForm = uiMaskWS.createUIComponent(UIPortalForm.class, null, "UIPortalForm");
            portalForm.setPortalOwner(portalName);
            portalForm.setBindingBean();
            uiMaskWS.setWindowSize(700, -1);
            context.addUIComponentToUpdateByAjax(uiMaskWS);
View Full Code Here

Examples of org.exoplatform.portal.webui.workspace.UIPortalApplication

    }

    public static class SaveActionListener extends EventListener<UIPageForm> {
        public void execute(Event<UIPageForm> event) throws Exception {
            UIPageForm uiPageForm = event.getSource();
            UIPortalApplication uiPortalApp = uiPageForm.getAncestorOfType(UIPortalApplication.class);
            PortalRequestContext pcontext = (PortalRequestContext) event.getRequestContext();
            UIMaskWorkspace uiMaskWS = uiPortalApp.getChildById(UIPortalApplication.UI_MASK_WS_ID);
            UIPage uiPage = uiPageForm.getUIPage();
            if (uiPage == null)
                return;

            Page page = new Page();
View Full Code Here

Examples of org.exoplatform.portal.webui.workspace.UIPortalApplication

    /**
     * View component on UIWorkspaceWorking $uicomp : current component on UIWorkspaceWorking $clazz : Class of component should
     * show on UIWorkspaceWorking
     */
    public static <T extends UIComponent> T showComponentOnWorking(UIComponent uicomp, Class<T> clazz) throws Exception {
        UIPortalApplication uiPortalApp = uicomp.getAncestorOfType(UIPortalApplication.class);
        UIWorkingWorkspace uiWorkingWS = uiPortalApp.getChildById(UIPortalApplication.UI_WORKING_WS_ID);
        UIPortalToolPanel uiToolPanel = uiWorkingWS.findFirstComponentOfType(UIPortalToolPanel.class).setRendered(true);
        T uiWork = uiToolPanel.createUIComponent(clazz, null, null);
        uiToolPanel.setUIComponent(uiWork);
        // uiWorkingWS.setRenderedChild(UIPortalToolPanel.class) ;
        return uiWork;
View Full Code Here

Examples of org.exoplatform.portal.webui.workspace.UIPortalApplication

    }

    public static void showComponentLayoutMode(Class clazz) {
        if (clazz == null)
            return;
        UIPortalApplication portalApp = getUIPortalApplication();
        UIEditInlineWorkspace uiEditWS = portalApp.findFirstComponentOfType(UIEditInlineWorkspace.class);
        UIContainer uiParent = null;

        UIComponent uiComponent = uiEditWS.getUIComponent();
        if (uiComponent instanceof UIPortal) {
            UIPortal uiPortal = (UIPortal) uiComponent;
View Full Code Here

Examples of org.exoplatform.portal.webui.workspace.UIPortalApplication

    }

    public static void showComponentEditInViewMode(Class clazz) {
        if (clazz == null)
            return;
        UIPortalApplication portalApp = getUIPortalApplication();
        UIEditInlineWorkspace uiEditWS = portalApp.findFirstComponentOfType(UIEditInlineWorkspace.class);

        UIComponent uiComponent = uiEditWS.getUIComponent();
        if (uiComponent instanceof UIPortal) {
            UIPortal uiPortal = (UIPortal) uiComponent;
            uiPortal.setMaximizedUIComponent(null);
View Full Code Here

Examples of org.exoplatform.portal.webui.workspace.UIPortalApplication

                .addScripts("portal.UIPortal.showViewMode('" + layoutMode + "');");
    }

    public static UIWorkingWorkspace updateUIApplication(Event<? extends UIComponent> event) {
        PortalRequestContext pcontext = (PortalRequestContext) event.getRequestContext();
        UIPortalApplication uiPortalApp = event.getSource().getAncestorOfType(UIPortalApplication.class);

        UIWorkingWorkspace uiWorkingWS = uiPortalApp.getChildById(UIPortalApplication.UI_WORKING_WS_ID);
        pcontext.addUIComponentToUpdateByAjax(uiWorkingWS);
        pcontext.ignoreAJAXUpdateOnPortlets(true);
        return uiWorkingWS;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.