Examples of UIWorkingWorkspace


Examples of org.exoplatform.portal.webui.workspace.UIWorkingWorkspace

    public static class ViewStep4ActionListener extends EventListener<UIPageCreationWizard> {
        public void execute(Event<UIPageCreationWizard> event) throws Exception {
            UIPageCreationWizard uiWizard = event.getSource();
            uiWizard.setShowActions(true);
            UIPortalApplication uiPortalApp = uiWizard.getAncestorOfType(UIPortalApplication.class);
            UIWorkingWorkspace uiWorkingWS = uiWizard.getAncestorOfType(UIWorkingWorkspace.class);
            uiWorkingWS.findFirstComponentOfType(UIPortalComposer.class).setRendered(false);
            if (uiWizard.isSelectedNodeExist()) {
                uiPortalApp.addMessage(new ApplicationMessage("UIPageCreationWizard.msg.NameNotSame", null));
                uiWizard.viewStep(FIRST_STEP);
                uiWizard.updateWizardComponent();
                return;
            }
            uiPortalApp.setModeState(UIPortalApplication.NORMAL_MODE);
            uiWorkingWS.setRenderedChild(UIPortalApplication.UI_VIEWING_WS_ID);

            PortalRequestContext pcontext = Util.getPortalRequestContext();

            try {
                UserNode newNode = uiWizard.saveData();
                NodeURL nodeURL = pcontext.createURL(NodeURL.TYPE).setNode(newNode);
                UIPortalToolPanel toolPanel = uiWorkingWS.findFirstComponentOfType(UIPortalToolPanel.class);
                toolPanel.setUIComponent(null);
                uiWizard.updateUIPortal(event);
                pcontext.sendRedirect(nodeURL.toString());
            } catch (NavigationServiceException ex) {
                pcontext.getUIApplication().addMessage(
View Full Code Here

Examples of org.exoplatform.portal.webui.workspace.UIWorkingWorkspace

            if (newComponent) {
                portalComposer.updateWorkspaceComponent();
                pcontext.ignoreAJAXUpdateOnPortlets(true);
            }

            UIWorkingWorkspace uiWorkingWS = uiApp.getChild(UIWorkingWorkspace.class);
            UIComponent uiWorking = uiWorkingWS.findFirstComponentOfType(UIPortalToolPanel.class);
            if (!uiWorking.isRendered()) {
                UIEditInlineWorkspace uiEditWS = uiWorkingWS.getChild(UIEditInlineWorkspace.class);
                uiWorking = uiEditWS.getUIComponent();
            }

            String sourceId = pcontext.getRequestParameter("srcID");
            UIComponent uiSource = uiWorking.findComponentById(sourceId);
View Full Code Here

Examples of org.exoplatform.portal.webui.workspace.UIWorkingWorkspace

            UIPopupWindow popup = getAncestorOfType(UIPopupWindow.class);
            popup.createEvent("ClosePopup", Phase.PROCESS, context).broadcast();

            PortalRequestContext prContext = Util.getPortalRequestContext();
            UIWorkingWorkspace uiWorkingWS = Util.getUIPortalApplication().getChild(UIWorkingWorkspace.class);
            prContext.addUIComponentToUpdateByAjax(uiWorkingWS);
            prContext.setFullRender(true);
        }
    }
View Full Code Here

Examples of org.exoplatform.portal.webui.workspace.UIWorkingWorkspace

                uiApp.setModeState(UIPortalApplication.APP_BLOCK_EDIT_MODE);
                // uiWorkingWS.setRenderedChild(UIPortalToolPanel.class);
                // uiWorkingWS.addChild(UIPortalComposer.class, "UIPageEditor",
                // null);

                UIWorkingWorkspace uiWorkingWS = uiApp.getChildById(UIPortalApplication.UI_WORKING_WS_ID);
                UIPortalToolPanel uiToolPanel = uiWorkingWS.findFirstComponentOfType(UIPortalToolPanel.class).setRendered(true);
                uiWorkingWS.setRenderedChild(UIEditInlineWorkspace.class);

                UIPortalComposer portalComposer = uiWorkingWS.findFirstComponentOfType(UIPortalComposer.class)
                        .setRendered(true);
                portalComposer.setShowControl(true);
                portalComposer.setEditted(false);
                portalComposer.setCollapse(false);
                portalComposer.setId("UIPageEditor");
View Full Code Here

Examples of org.exoplatform.portal.webui.workspace.UIWorkingWorkspace

            }

            UserNavigation navigation = userPortal.getNavigation(siteKey);
            if (navigation == null) {
                uiApplication.addMessage(new ApplicationMessage("UIGroupNavigationManagement.msg.navigation-not-exist", null));
                UIWorkingWorkspace uiWorkingWS = Util.getUIPortalApplication().getChild(UIWorkingWorkspace.class);
                uiWorkingWS.updatePortletsByName("UserToolbarGroupPortlet");
                return;
            }

            doEdit(navigation, event);
        }
View Full Code Here

Examples of org.exoplatform.portal.webui.workspace.UIWorkingWorkspace

            }

            //
            event.getRequestContext().addUIComponentToUpdateByAjax(uicomp);
            // Update UserToolbarGroupPortlet
            UIWorkingWorkspace uiWorkingWS = Util.getUIPortalApplication().getChild(UIWorkingWorkspace.class);
            uiWorkingWS.updatePortletsByName("UserToolbarGroupPortlet");
        }
View Full Code Here

Examples of org.exoplatform.portal.webui.workspace.UIWorkingWorkspace

            uiMaskWS.setUIComponent(uiNewPortal);
            uiMaskWS.setShow(true);
            prContext.addUIComponentToUpdateByAjax(uiMaskWS);

            // If other users has add or remove group navigation, we need to refresh this portlet
            UIWorkingWorkspace uiWorkingWS = Util.getUIPortalApplication().getChild(UIWorkingWorkspace.class);
            uiWorkingWS.updatePortletsByName("UserToolbarGroupPortlet");
        }
View Full Code Here

Examples of org.exoplatform.portal.webui.workspace.UIWorkingWorkspace

            String portalName = event.getRequestContext().getRequestParameter(OBJECTID);
            UserPortalConfigService service = uicomp.getApplicationComponent(UserPortalConfigService.class);
            DataStorage dataStorage = uicomp.getApplicationComponent(DataStorage.class);
            PortalRequestContext prContext = Util.getPortalRequestContext();
            UIPortalApplication portalApp = (UIPortalApplication) prContext.getUIApplication();
            UIWorkingWorkspace uiWorkingWS = portalApp.getChildById(UIPortalApplication.UI_WORKING_WS_ID);

            PortalConfig pConfig = dataStorage.getPortalConfig(portalName);

            if (pConfig == null) {
                portalApp.addMessage(new ApplicationMessage("UISiteManagement.msg.portal-not-exist",
                        new String[] { portalName }));
                uiWorkingWS.updatePortletsByName("UserToolbarSitePortlet");
                return;
            }

            UserACL userACL = portalApp.getApplicationComponent(UserACL.class);
            if (!userACL.hasEditPermission(pConfig)) {
                portalApp.addMessage(new ApplicationMessage("UISiteManagement.msg.Invalid-editPermission",
                        new String[] { pConfig.getName() }));
                return;
            }

            // UIEditInlineWorkspace uiEditWS = uiWorkingWS.addChild(UIEditInlineWorkspace.class, null,
            // UIPortalApplication.UI_EDITTING_WS_ID);
            UIEditInlineWorkspace uiEditWS = uiWorkingWS.getChildById(UIPortalApplication.UI_EDITTING_WS_ID);
            UIPortalComposer uiComposer = uiEditWS.getComposer().setRendered(true);
            uiComposer.setEditted(false);
            uiComposer.setCollapse(false);
            uiComposer.setShowControl(true);
            uiComposer.setComponentConfig(UIPortalComposer.class, null);
            uiComposer.setId(UIPortalComposer.UIPORTAL_COMPOSER);

            UIPortal uiPortal = Util.getUIPortal();
            uiWorkingWS.setBackupUIPortal(uiPortal);

            UIPortal editPortal = uiWorkingWS.createUIComponent(UIPortal.class, null, null);
            PortalDataMapper.toUIPortal(editPortal, pConfig);
            uiEditWS.setUIComponent(editPortal);

            // Check if edit current portal
            if (uiPortal.getName().equals(editPortal.getName())) {
                // editPortal.setSelectedNode(uiPortal.getSelectedNode());
                // editPortal.setNavigation(uiPortal.getNavigation());
                // editPortal.setSelectedPath(uiPortal.getSelectedPath());
                editPortal.setNavPath(uiPortal.getNavPath());
                UISiteBody siteBody = uiWorkingWS.findFirstComponentOfType(UISiteBody.class);
                siteBody.setUIComponent(null);
            }

            editPortal.refreshUIPage();
            portalApp.setModeState(UIPortalApplication.APP_BLOCK_EDIT_MODE);
            uiWorkingWS.setRenderedChild(UIPortalApplication.UI_EDITTING_WS_ID);

            prContext.addUIComponentToUpdateByAjax(uiWorkingWS);
            prContext.ignoreAJAXUpdateOnPortlets(true);
        }
View Full Code Here

Examples of org.exoplatform.portal.webui.workspace.UIWorkingWorkspace

            UserPortalConfig userPortalConfig = configService.getUserPortalConfig(portalName, context.getRemoteUser(),
                    PortalRequestContext.USER_PORTAL_CONTEXT);
            if (userPortalConfig == null) {
                uiApplication.addMessage(new ApplicationMessage("UISiteManagement.msg.portal-not-exist",
                        new String[] { portalName }));
                UIWorkingWorkspace uiWorkingWS = Util.getUIPortalApplication().getChildById(
                        UIPortalApplication.UI_WORKING_WS_ID);
                uiWorkingWS.updatePortletsByName("UserToolbarSitePortlet");
                return;
            }

            UserACL userACL = uicomp.getApplicationComponent(UserACL.class);
            if (!userACL.hasEditPermission(userPortalConfig.getPortalConfig())) {
View Full Code Here

Examples of org.exoplatform.portal.webui.workspace.UIWorkingWorkspace

                currentUIPortal.getEditPermission());
    }

    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();
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.