Package org.exoplatform.portal.webui.page

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


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


        @Override
        public void execute(Event<UIWorkingWorkspace> event) throws Exception {

            UIWorkingWorkspace workingWorkspace = event.getSource();
            UIPage uiPage = workingWorkspace.findFirstComponentOfType(UIPage.class);

            Method showEditBackgroundPopupMethod = null;
            try {
                if (uiPage == null) {
                    return;
                }
                showEditBackgroundPopupMethod = uiPage.getClass().getDeclaredMethod("showEditBackgroundPopup",
                        WebuiRequestContext.class);
            } catch (NoSuchMethodException ex) {
                log.warn(ex.getMessage(), ex);
            }
            if (showEditBackgroundPopupMethod != null) {
View Full Code Here

        pageContext.update(page);
        return toUIPage(page, uiParent);
    }

    public static UIPage toUIPage(Page page, UIComponent uiParent) throws Exception {
        UIPage uiPage = Util.getUIPortal().findFirstComponentOfType(UIPage.class);
        if (uiPage != null && uiPage.getId().equals(page.getId()))
            return uiPage;
        WebuiRequestContext context = Util.getPortalRequestContext();

        UIPageFactory clazz = UIPageFactory.getInstance(page.getFactoryId());
        uiPage = clazz.createUIPage(context);
View Full Code Here

            UIPortal uiPortal = (UIPortal) uiComponent;
            uiPortal.setMaximizedUIComponent(null);
            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

            UIEditInlineWorkspace editInlineWS = event.getSource().getParent();
            UIWorkingWorkspace uiWorkingWS = editInlineWS.getParent();
            UIPortalToolPanel uiToolPanel = uiWorkingWS.findFirstComponentOfType(UIPortalToolPanel.class);
            Util.getPortalRequestContext().addUIComponentToUpdateByAjax(uiWorkingWS);

            UIPage uiPage = uiToolPanel.findFirstComponentOfType(UIPage.class);
            Page page = (Page) PortalDataMapper.buildModelObject(uiPage);
            String pageId = page.getPageId();

            UserPortalConfigService portalConfigService = uiWorkingWS.getApplicationComponent(UserPortalConfigService.class);
View Full Code Here

            // Navigation related properties
            addProperty(properties, navigationURIQName, currentNode.getURI());

            // Page related properties
            PageKey pageRef = currentNode.getPageRef();
            UIPage currentPage = currentSite.getUIPage(pageRef != null ? pageRef.format() : null);
            if (currentPage != null) {
                addProperty(properties, pageNameQName, currentPage.getTitle());
            }

            // Site related properties
            addProperty(properties, siteTypeQName, currentSite.getSiteType().getName());
            addProperty(properties, siteNameQName, currentSite.getName());
View Full Code Here

            }

            UIPortalComposer portalComposer = uiApp.findFirstComponentOfType(UIPortalComposer.class);
            portalComposer.setEditted(true);

            UIPage uiPage = uiComponentTobeRemoved.getAncestorOfType(UIPage.class);
            if (uiPage != null && uiPage.getMaximizedUIPortlet() != null) {
                if (id.equals(uiPage.getMaximizedUIPortlet().getId())) {
                    uiPage.setMaximizedUIPortlet(null);
                }
            } else {
                UIPortal uiPortal = Util.getUIPortal();
                if (uiPortal != null && uiPortal.getMaximizedUIComponent() != null) {
                    if (id.equals(uiPortal.getMaximizedUIComponent().getId())) {
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());
                        uiPortlet.setState(new PortletState(state, applicationType));
View Full Code Here

            UIPortalToolPanel uiToolPanel = uiWorkingWS.findFirstComponentOfType(UIPortalToolPanel.class);
            UIPortalApplication uiPortalApp = Util.getUIPortalApplication();
            UIMaskWorkspace uiMaskWS = uiPortalApp.getChildById(UIPortalApplication.UI_MASK_WS_ID);
            UIPageForm uiPageForm = uiPortalApp.createUIComponent(UIPageForm.class, null, null);

            UIPage uiPage = uiToolPanel.findFirstComponentOfType(UIPage.class);
            uiPageForm.buildForm(uiPage);
            uiMaskWS.setUIComponent(uiPageForm);
            event.getRequestContext().addUIComponentToUpdateByAjax(uiMaskWS);
        }
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) {
                    uiPage.normalizePortletWindowStates();
                    uiPage.setMaximizedUIPortlet(uiPortlet);
                    uiPortlet.setCurrentWindowState(WindowState.MAXIMIZED);
                }
            } else if (WindowState.MINIMIZED.equals(state)) {
                uiPortlet.setCurrentWindowState(WindowState.MINIMIZED);
                if (uiPage != null) {
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.