Examples of UIEditInlineWorkspace


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

     * @throws Exception
     */
    public void updateWorkspaceComponent() throws Exception {
        UIPortalApplication uiApp = Util.getUIPortalApplication();
        WebuiRequestContext rcontext = WebuiRequestContext.getCurrentInstance();
        UIEditInlineWorkspace uiEditWS = uiApp.findFirstComponentOfType(UIEditInlineWorkspace.class);
        List<UIComponent> children = uiEditWS.getChildren();
        for (UIComponent child : children) {
            if (!child.isRendered() || child.getClass().equals(UIPortalComposer.class)) {
                continue;
            }
            rcontext.addUIComponentToUpdateByAjax(child);
View Full Code Here

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

        public void execute(Event<UIPortalComposer> event) throws Exception {
            UIComponent temp = null;
            UIPortal uiPortal = null;
            String portalOwner = null;
            UIEditInlineWorkspace uiEditWS = event.getSource().getAncestorOfType(UIEditInlineWorkspace.class);
            temp = uiEditWS.getUIComponent();
            if (temp != null && (temp instanceof UIPortal)) {
                uiPortal = (UIPortal) temp;
                if (uiPortal.getSiteType().equals(SiteType.PORTAL)) {
                    portalOwner = uiPortal.getName();
                } else {
View Full Code Here

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

        public void execute(Event<UIPortalComposer> event) throws Exception {
            PortalRequestContext prContext = Util.getPortalRequestContext();
            UIPortalApplication uiPortalApp = (UIPortalApplication) prContext.getUIApplication();
            uiPortalApp.setModeState(UIPortalApplication.NORMAL_MODE);
            UIWorkingWorkspace uiWorkingWS = uiPortalApp.getChildById(UIPortalApplication.UI_WORKING_WS_ID);
            UIEditInlineWorkspace uiEditWS = uiWorkingWS.getChild(UIEditInlineWorkspace.class);
            uiEditWS.getComposer().setEditted(false);
            uiEditWS.setRendered(false);
            uiWorkingWS.setRenderedChild(UIPortalApplication.UI_VIEWING_WS_ID);
            prContext.ignoreAJAXUpdateOnPortlets(true);
            UISiteBody siteBody = uiWorkingWS.findFirstComponentOfType(UISiteBody.class);

            UIPortal uiPortal = uiWorkingWS.getBackupUIPortal();
View Full Code Here

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

    }

    public static void showComponentEditInBlockMode() {
        updatePortalMode();
        UIPortalApplication portalApp = getUIPortalApplication();
        UIEditInlineWorkspace uiEditWS = portalApp.findFirstComponentOfType(UIEditInlineWorkspace.class);

        UIComponent uiComponent = uiEditWS.getUIComponent();
        if (uiComponent instanceof UIPortal) {
            UIPortal uiPortal = (UIPortal) uiComponent;
            uiPortal.setMaximizedUIComponent(null);
        } else {
            UIPortalToolPanel uiPortalToolPanel = getUIPortalToolPanel();
View Full Code Here

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

    }

    public static void showComponentEditInViewMode() {
        updatePortalMode();
        UIPortalApplication portalApp = getUIPortalApplication();
        UIEditInlineWorkspace uiEditWS = portalApp.findFirstComponentOfType(UIEditInlineWorkspace.class);

        UIComponent uiComponent = uiEditWS.getUIComponent();
        if (uiComponent instanceof UIPortal) {
            UIPortal uiPortal = (UIPortal) uiComponent;
            uiPortal.setMaximizedUIComponent(null);
        }
View Full Code Here

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

        DataStorage dataStorage = this.getApplicationComponent(DataStorage.class);

        UIPortal editPortal = null;
        UIPortalApplication uiPortalApp = Util.getUIPortalApplication();
        UIEditInlineWorkspace uiEditWS = uiPortalApp.<UIWorkingWorkspace> getChildById(UIPortalApplication.UI_WORKING_WS_ID)
                .getChild(UIEditInlineWorkspace.class);
        if (uiPortalApp.getModeState() != UIPortalApplication.NORMAL_MODE && uiEditWS != null
                && uiEditWS.getUIComponent() != null && (uiEditWS.getUIComponent() instanceof UIPortal)) {
            editPortal = (UIPortal) uiEditWS.getUIComponent();
        } else {
            PortalConfig pConfig = dataStorage.getPortalConfig(getPortalOwner());
            editPortal = this.createUIComponent(UIPortal.class, null, null);
            PortalDataMapper.toUIPortal(editPortal, pConfig);
        }
View Full Code Here

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

                    // TODO: Raise Portlet Event instead
                    uiWorkingWS.updatePortletsByName("PortalNavigationPortlet");
                    uiWorkingWS.updatePortletsByName("UserToolbarSitePortlet");
                } else {
                    UIWorkingWorkspace uiWorkingWS = uiPortalApp.findFirstComponentOfType(UIWorkingWorkspace.class);
                    UIEditInlineWorkspace uiEditWS = uiWorkingWS.getChild(UIEditInlineWorkspace.class);
                    UIPortal editPortal = (UIPortal) uiEditWS.getUIComponent();
                    uiForm.invokeSetBindingBean(editPortal);

                    //Need to refresh to make sure Move*-permission take effect immediately
                    UIPortalComposer portalComposer = uiPortalApp.findFirstComponentOfType(UIPortalComposer.class);
                    portalComposer.updateWorkspaceComponent();
View Full Code Here

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

            }

            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.UIEditInlineWorkspace

     */
    public void saveSite() throws Exception {
        PortalRequestContext prContext = Util.getPortalRequestContext();
        UIPortalApplication uiPortalApp = (UIPortalApplication) prContext.getUIApplication();
        UIWorkingWorkspace uiWorkingWS = uiPortalApp.findFirstComponentOfType(UIWorkingWorkspace.class);
        UIEditInlineWorkspace uiEditWS = uiWorkingWS.getChild(UIEditInlineWorkspace.class);
        UIPortal editPortal = (UIPortal) uiEditWS.getUIComponent();
        UIPortal uiPortal = Util.getUIPortal();
        String remoteUser = prContext.getRemoteUser();

        PortalConfig portalConfig = (PortalConfig) PortalDataMapper.buildModelObject(editPortal);
        DataStorage dataStorage = getApplicationComponent(DataStorage.class);
        UserACL acl = getApplicationComponent(UserACL.class);

        setEditted(false);

        // Reset tab pane state
        UITabPane tabPane = getChild(UITabPane.class);
        tabPane.setSelectedTab(1);

        uiPortalApp.setSessionOpen(PortalProperties.SESSION_ALWAYS.equals(uiPortal.getSessionAlive()));
        uiPortalApp.setModeState(UIPortalApplication.NORMAL_MODE);
        uiWorkingWS.setRenderedChild(UIPortalApplication.UI_VIEWING_WS_ID);
        prContext.ignoreAJAXUpdateOnPortlets(true);

        if (isPortalExist(editPortal)) {
            SkinService skinService = getApplicationComponent(SkinService.class);
            skinService.invalidatePortalSkinCache(editPortal.getName(), editPortal.getSkin());
            try {
                dataStorage.save(portalConfig);
            } catch (StaleModelException ex) {
                // Temporary solution for concurrency-related issue. The StaleModelException should be
                // caught in the ApplicationLifecycle
                rebuildUIPortal(uiPortalApp, editPortal, dataStorage);
            }
            prContext.getUserPortalConfig().setPortalConfig(portalConfig);
            PortalConfig pConfig = dataStorage.getPortalConfig(uiPortal.getSiteKey().getTypeName(), uiPortal.getSiteKey()
                    .getName());
            if (pConfig != null) {
                editPortal.setModifiable(acl.hasEditPermission(pConfig));
                prContext.getUserPortalConfig().setPortalConfig(pConfig);
            } else {
                editPortal.setModifiable(false);
            }
            LocaleConfigService localeConfigService = uiPortalApp.getApplicationComponent(LocaleConfigService.class);
            LocaleConfig localeConfig = localeConfigService.getLocaleConfig(portalConfig.getLocale());
            if (localeConfig == null) {
                localeConfig = localeConfigService.getDefaultLocaleConfig();
            }
            // TODO dang.tung - change layout when portal get language from UIPortal
            // (user and browser not support)
            // ----------------------------------------------------------------------------------------------------
            String portalAppLanguage = prContext.getLocale().getLanguage();
            OrganizationService orgService = getApplicationComponent(OrganizationService.class);
            UserProfile userProfile = orgService.getUserProfileHandler().findUserProfileByName(remoteUser);
            String userLanguage = userProfile != null ? userProfile.getUserInfoMap().get(Constants.USER_LANGUAGE) : null;
            String browserLanguage = prContext.getRequest().getLocale().getLanguage();

            // in case: edit current portal, set skin and language for uiPortalApp
            if (uiPortal == null) {
                if (!portalAppLanguage.equals(userLanguage) && !portalAppLanguage.equals(browserLanguage)) {
                    prContext.setLocale(localeConfig.getLocale());
                }
                uiPortalApp.setSkin(editPortal.getSkin());
            }
            prContext.refreshResourceBundle();

            UISiteBody siteBody = uiWorkingWS.findFirstComponentOfType(UISiteBody.class);
            uiPortal = (UIPortal) siteBody.getUIComponent();
            if (uiPortal == null) {
                siteBody.setUIComponent(editPortal);
            }
            uiEditWS.setRendered(false);
            uiPortal = (UIPortal) siteBody.getUIComponent();

            // Update the cache of UIPortal from UIPortalApplication
            uiPortalApp.refreshCachedUI();

View Full Code Here

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

     * @throws Exception
     */
    public void updateWorkspaceComponent() throws Exception {
        UIPortalApplication uiApp = Util.getUIPortalApplication();
        WebuiRequestContext rcontext = WebuiRequestContext.getCurrentInstance();
        UIEditInlineWorkspace uiEditWS = uiApp.findFirstComponentOfType(UIEditInlineWorkspace.class);
        List<UIComponent> children = uiEditWS.getChildren();
        for (UIComponent child : children) {
            if (!child.isRendered() || child.getClass().equals(UIPortalComposer.class)) {
                continue;
            }
            rcontext.addUIComponentToUpdateByAjax(child);
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.