Package org.exoplatform.portal.webui.page

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


                  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);
                  }
               }
            }
         }
         Util.showComponentLayoutMode(uiRemoveComponent.getClass());
View Full Code Here


         //TODO TrongTT: We should use only parameter for change WindowState
         if (windowState == null)
         {
            windowState = event.getRequestContext().getRequestParameter(UIComponent.OBJECTID).trim();
         }
         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

            uiToolPanel.setUIComponent(null);
            return;
         }

         UIPage uiPage = Util.toUIPage(node, uiToolPanel);
         UIPageBody uiPageBody = uiPortalApp.findFirstComponentOfType(UIPageBody.class);
         if (uiPageBody.getUIComponent() != null)
         {
            uiPageBody.setUIComponent(null);
         }
         uiToolPanel.setUIComponent(uiPage);
      }
View Full Code Here

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

      {
         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

            // 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);
                }
                nextNode = selectedNode;
            }

            PortalRequestContext prContext = Util.getPortalRequestContext();
View Full Code Here

            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) {
                    normalizePortletWindowStates(uiPage);

                    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

TOP

Related Classes of org.exoplatform.portal.webui.page.UIPageBody

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.