Examples of UIPageBody


Examples of org.exoplatform.portal.webui.page.UIPageBody

         //If the node is removed successfully, then redirect to the node specified by tab on the left
         if (selectedNode != null)
         {
            // set maximizedUIComponent of UIPageBody is null if it is maximized portlet of removed page
            UIPortal uiPortal = Util.getUIPortal();
            UIPageBody uiPageBody = uiPortal.findFirstComponentOfType(UIPageBody.class);
            if (uiPageBody != null && uiPageBody.getMaximizedUIComponent() != null)
            {
               uiPageBody.setMaximizedUIComponent(null);
            }

            PortalRequestContext prContext = Util.getPortalRequestContext();
            prContext.setResponseComplete(true);
            prContext.getResponse().sendRedirect(prContext.getPortalURI() + selectedNode.getUri());
View Full Code Here

Examples of org.exoplatform.portal.webui.page.UIPageBody

   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());
View Full Code Here

Examples of org.exoplatform.portal.webui.page.UIPageBody

     * Refresh the UIPage under UIPortal
     *
     * @throws Exception
     */
    public void refreshUIPage() throws Exception {
        UIPageBody uiPageBody = findFirstComponentOfType(UIPageBody.class);
        if (uiPageBody == null) {
            return;
        }

        uiPageBody.setPageBody(getSelectedUserNode(), this);
    }
View Full Code Here

Examples of org.exoplatform.portal.webui.page.UIPageBody

        if (model instanceof SiteBody) {
            UISiteBody uiSiteBody = uiContainer.createUIComponent(context, UISiteBody.class, null, null);
            uiSiteBody.setStorageId(((SiteBody) model).getStorageId());
            uiComponent = uiSiteBody;
        } else if (model instanceof PageBody) {
            UIPageBody uiPageBody = uiContainer.createUIComponent(context, UIPageBody.class, null, null);
            uiPageBody.setStorageId(((PageBody) model).getStorageId());
            uiComponent = uiPageBody;
        } else if (model instanceof Application) {
            Application application = (Application) model;

            if (dashboard && application.getType() == ApplicationType.GADGET) {
View Full Code Here

Examples of org.exoplatform.portal.webui.page.UIPageBody

     * Refresh the UIPage under UIPortal
     *
     * @throws Exception
     */
    public void refreshUIPage() throws Exception {
        UIPageBody uiPageBody = findFirstComponentOfType(UIPageBody.class);
        if (uiPageBody == null) {
            return;
        }

        if (uiPageBody.getMaximizedUIComponent() != null) {
            UIPortlet currentPortlet = (UIPortlet) uiPageBody.getMaximizedUIComponent();
            currentPortlet.setCurrentWindowState(WindowState.NORMAL);
            uiPageBody.setMaximizedUIComponent(null);
        }
        uiPageBody.setPageBody(getSelectedUserNode(), this);
    }
View Full Code Here

Examples of org.exoplatform.portal.webui.page.UIPageBody

                if (uiPortal != null && uiPortal.getMaximizedUIComponent() != null) {
                    if (id.equals(uiPortal.getMaximizedUIComponent().getId())) {
                        uiPortal.setMaximizedUIComponent(null);
                    }
                } else {
                    UIPageBody uiPageBody = uiPortal.findFirstComponentOfType(UIPageBody.class);
                    if (uiPageBody != null && uiPageBody.getMaximizedUIComponent() != null) {
                        if (id.equals(uiPageBody.getMaximizedUIComponent().getId())) {
                            uiPageBody.setMaximizedUIComponent(null);
                        }
                    }
                }
            }
View Full Code Here

Examples of org.exoplatform.portal.webui.page.UIPageBody

            if (windowState == null) {
                windowState = uiPortlet.getCurrentWindowState().toString();
            }

            UIPageBody uiPageBody = uiPortlet.getAncestorOfType(UIPageBody.class);
            UIPage uiPage = uiPortlet.getAncestorOfType(UIPage.class);
            if (windowState.equals(WindowState.MAXIMIZED.toString())) {
                if (uiPageBody != null) {
                    uiPortlet.setCurrentWindowState(WindowState.MAXIMIZED);
                    // TODO dang.tung: we have to set maximized portlet for page because in ShowMaxWindow case the PageBody
                    // isn't rendered
                    // reference: UIPortalLifecycle, UIPageLifecycle, renderChildren() in UIPageBody
                    // ---------------------------------------------------------
                    if (uiPage != null && uiPage.isShowMaxWindow()) {
                        uiPage.setMaximizedUIPortlet(uiPortlet);
                    }
                    // ---------------------------------------------------------
                    uiPageBody.setMaximizedUIComponent(uiPortlet);
                } else {
                    uiPortlet.setCurrentWindowState(WindowState.NORMAL);
                }
                return;
            }
            if (uiPageBody != null) {
                UIPortlet maxPortlet = (UIPortlet) uiPageBody.getMaximizedUIComponent();
                if (maxPortlet == uiPortlet) {
                    uiPageBody.setMaximizedUIComponent(null);
                }
            }
            // TODO dang.tung: for ShowMaxWindow situation
            // ----------------------------------------------------------------
            if (uiPage != null) {
View Full Code Here

Examples of org.exoplatform.portal.webui.page.UIPageBody

    }

    private boolean hasEditPermissionOnPage() throws Exception {
        UIPortalApplication portalApp = Util.getUIPortalApplication();
        UIWorkingWorkspace uiWorkingWS = portalApp.getChildById(UIPortalApplication.UI_WORKING_WS_ID);
        UIPageBody pageBody = uiWorkingWS.findFirstComponentOfType(UIPageBody.class);
        if (pageBody == null) {
            return false;
        }

        UIPage uiPage = (UIPage) pageBody.getUIComponent();
        UserACL userACL = portalApp.getApplicationComponent(UserACL.class);

        if (uiPage != null) {
            return userACL.hasEditPermissionOnPage(uiPage.getSiteKey().getTypeName(), uiPage.getSiteKey().getName(),
                    uiPage.getEditPermission());
View Full Code Here

Examples of org.exoplatform.portal.webui.page.UIPageBody

      {
         UIPortalApplication uiApp = Util.getUIPortalApplication();
         UIWorkingWorkspace uiWorkingWS = uiApp.getChildById(UIPortalApplication.UI_WORKING_WS_ID);

         // check edit permission for page
         UIPageBody pageBody = uiWorkingWS.findFirstComponentOfType(UIPageBody.class);
         UIPage uiPage = (UIPage)pageBody.getUIComponent();
         if (uiPage == null)
         {
            uiApp.addMessage(new ApplicationMessage("UIPageBrowser.msg.PageNotExist", null));
            return;
         }
         Page page = PortalDataMapper.toPageModel(uiPage);

         UserACL userACL = uiApp.getApplicationComponent(UserACL.class);
         if (!userACL.hasEditPermission(page))
         {
            uiApp.addMessage(new ApplicationMessage("UIPortalManagement.msg.Invalid-EditPage-Permission", null));
            return;
         }

         uiWorkingWS.setRenderedChild(UIEditInlineWorkspace.class);

         UIPortalComposer portalComposer =
            uiWorkingWS.findFirstComponentOfType(UIPortalComposer.class).setRendered(true);
         portalComposer.setComponentConfig(UIPortalComposer.class, "UIPageEditor");
         portalComposer.setId("UIPageEditor");
         portalComposer.setShowControl(true);
         portalComposer.setEditted(false);
         portalComposer.setCollapse(false);

         UIPortalToolPanel uiToolPanel = uiWorkingWS.findFirstComponentOfType(UIPortalToolPanel.class);
         uiToolPanel.setShowMaskLayer(false);
         uiApp.setModeState(UIPortalApplication.APP_BLOCK_EDIT_MODE);

         // We clone the edited UIPage object, that is required for Abort action
         //UIPage newUIPage = new UIPage();
         UIPage newUIPage = uiWorkingWS.createUIComponent(UIPage.class, null, null);
         PortalDataMapper.toUIPage(newUIPage, page);
         uiToolPanel.setWorkingComponent(newUIPage);

         // Remove current UIPage from UIPageBody
         pageBody.setUIComponent(null);

         event.getRequestContext().addUIComponentToUpdateByAjax(uiWorkingWS);
         Util.getPortalRequestContext().setFullRender(true);
      }
View Full Code Here

Examples of org.exoplatform.portal.webui.page.UIPageBody

      if(selectedNode_ == null)
      {
         selectedNode_ = navigation.getNodes().get(0);
      }
     
      UIPageBody uiPageBody = findFirstComponentOfType(UIPageBody.class);
      if(uiPageBody == null)
      {
         return;
      }
     
      if (uiPageBody.getMaximizedUIComponent() != null)
      {
         UIPortlet currentPortlet = (UIPortlet)uiPageBody.getMaximizedUIComponent();
         currentPortlet.setCurrentWindowState(WindowState.NORMAL);
         uiPageBody.setMaximizedUIComponent(null);
      }
      uiPageBody.setPageBody(selectedNode_, this);
     
      //Refresh locale
      Locale locale = Util.getUIPortalApplication().getLocale();
      localizePageNavigation(navigation, locale);
   }
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.