Package org.exoplatform.portal.webui.page

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


         uiParent = uiPortal;
      }
      else
      {
         UIPortalToolPanel uiPortalToolPanel = getUIPortalToolPanel();
         UIPage uiPage = uiPortalToolPanel.findFirstComponentOfType(UIPage.class);
         uiParent = uiPage;
      }
      if (uiParent == null)
         return;
      String layoutMode = clazz.getSimpleName();
View Full Code Here


         uiParent = uiPortal;
      }
      else
      {
         UIPortalToolPanel uiPortalToolPanel = getUIPortalToolPanel();
         UIPage uiPage = uiPortalToolPanel.findFirstComponentOfType(UIPage.class);
         uiParent = uiPage;
      }
      if (uiParent == null)
         return;
      String layoutMode = clazz.getSimpleName();
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);
View Full Code Here

                     accessPers = null;
               }
               if (accessPers == null || accessPers.length == 0)
                  accessPers = new String[]{UserACL.EVERYONE};
               uiPortlet.setAccessPermissions(accessPers);
               UIPage uiPage = uiTarget.getAncestorOfType(UIPage.class);

               // Hardcode on state to fix error while drag/drop Dashboard
               if ("dashboard/DashboardPortlet".equals(app.getContentId()))
               {
                  TransientApplicationState state = new TransientApplicationState<Object>(app.getContentId());
View Full Code Here

    /**
     * This method is used to set the next portlet window state if this one needs to be modified because of the incoming request
     */
    public static void setNextState(UIPortlet uiPortlet, WindowState state) {
        if (state != null) {
            UIPage uiPage = uiPortlet.getAncestorOfType(UIPage.class);

            if (WindowState.MAXIMIZED.equals(state)) {
                if (uiPage != null) {
                    normalizePortletWindowStates(uiPage);
                    uiPage.setMaximizedUIPortlet(uiPortlet);
                    uiPortlet.setCurrentWindowState(WindowState.MAXIMIZED);
                }
            } else if (WindowState.MINIMIZED.equals(state)) {
                uiPortlet.setCurrentWindowState(WindowState.MINIMIZED);
                if (uiPage != null) {
                    if(uiPage.getMaximizedUIPortlet() != null && uiPage.getMaximizedUIPortlet().getId().equals(uiPortlet.getId())) {
                        uiPage.setMaximizedUIPortlet(null);
                    }
                }
            } else {
                uiPortlet.setCurrentWindowState(WindowState.NORMAL);
                if (uiPage != null) {
                    if(uiPage.getMaximizedUIPortlet() != null && uiPage.getMaximizedUIPortlet().getId().equals(uiPortlet.getId())) {
                        uiPage.setMaximizedUIPortlet(null);
                    }
                }
            }
        }
    }
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) {
                UIPortlet maxPortlet = (UIPortlet) uiPage.getMaximizedUIPortlet();
                if (maxPortlet == uiPortlet) {
                    uiPage.setMaximizedUIPortlet(null);
                }
            }
            // -----------------------------------------------------------------
            if (windowState.equals(WindowState.MINIMIZED.toString())) {
                uiPortlet.setCurrentWindowState(WindowState.MINIMIZED);
View Full Code Here

TOP

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

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.