Package org.exoplatform.portal.webui.page

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


    /**
     * 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)) {
                uiPortlet.setCurrentWindowState(WindowState.MAXIMIZED);
                if (uiPage != null) {
                    uiPage.setMaximizedUIPortlet(uiPortlet);
                }
            } else if (WindowState.MINIMIZED.equals(state)) {
                uiPortlet.setCurrentWindowState(WindowState.MINIMIZED);
                if (uiPage != null) {
                    uiPage.setMaximizedUIPortlet(null);
                }
            } else {
                uiPortlet.setCurrentWindowState(WindowState.NORMAL);
                if (uiPage != null) {
                    uiPage.setMaximizedUIPortlet(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

        if (uiComponent instanceof UIPortal) {
            UIPortal uiPortal = (UIPortal) uiComponent;
            uiPortal.setMaximizedUIComponent(null);
        } else {
            UIPortalToolPanel uiPortalToolPanel = getUIPortalToolPanel();
            UIPage uiPage = uiPortalToolPanel.findFirstComponentOfType(UIPage.class);
            if (uiPage != null) {
                Util.getPortalRequestContext()
                        .getJavascriptManager().require("SHARED/portal", "portal")
                        .addScripts("eXo.portal.UIPortal.showComponentEditInBlockMode();");
            }
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

        UIPortalApplication uiPortalApp = Util.getUIPortalApplication();
        UIPortal uiPortal = uiPortalApp.getCurrentSite();
        DataStorage dataService = uiWorkingWS.getApplicationComponent(DataStorage.class);
        PageService pageService = uiWorkingWS.getApplicationComponent(PageService.class);

        UIPage uiPage;
        if (!UIPage.isFullPreview()) {
            uiPage = uiToolPanel.findFirstComponentOfType(UIPage.class);
        } else {
            uiPage = uiWorkingWS.findFirstComponentOfType(UIPage.class);
        }
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

            UITabPane tabPane = event.getSource().getChild(UITabPane.class);
            tabPane.setSelectedTab(1);
            UIPortal uiPortal = uiPortalApp.getCurrentSite();
            UIPortalToolPanel uiToolPanel = uiWorkingWS.findFirstComponentOfType(UIPortalToolPanel.class);

            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

         */
        @Override
        public boolean authorizeEditPage(UIPortal currentPortal, UIPortalApplication portalApp) {
            // check edit permission for page
            UserACL userACL = currentPortal.getApplicationComponent(UserACL.class);
            UIPage uiPage = currentPortal.findFirstComponentOfType(UIPage.class);
            SiteKey siteKey = uiPage.getSiteKey();
            if (userACL.hasEditPermissionOnPage(siteKey.getTypeName(), siteKey.getName(), uiPage.getEditPermission())) {
                return true;
            } else {
                portalApp.addMessage(
                        new ApplicationMessage("UIPortalManagement.msg.Invalid-EditPage-Permission", null));
                return false;
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

            portalComposer.setId("UIPageEditor");
            portalComposer.setComponentConfig(UIPortalComposer.class, "UIPageEditor");

            uiToolPanel.setShowMaskLayer(false);
            uiToolPanel.setWorkingComponent(UIPage.class, null);
            UIPage uiPage = (UIPage)uiToolPanel.getUIComponent();

            WebuiRequestContext context = WebuiRequestContext.getCurrentInstance();
            if(selectPage.getTitle() == null)
               selectPage.setTitle(selectedPageNode.getLabel());
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.