Examples of UIPortal


Examples of org.exoplatform.portal.webui.portal.UIPortal

    }

    @Override
    public void getProperties(UIPortlet portletWindow, Map<QName, String[]> properties) {
        try {
            UIPortal currentSite = Util.getUIPortalApplication().getCurrentSite();
            UserNode currentNode = currentSite.getSelectedUserNode();

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

            // Window related properties
            addProperty(properties, windowShowInfoBarQName, Boolean.toString(portletWindow.getShowInfoBar()));
            addProperty(properties, windowWidth, portletWindow.getWidth());
            addProperty(properties, windowHeight, portletWindow.getHeight());
View Full Code Here

Examples of org.exoplatform.portal.webui.portal.UIPortal

        Text markup = null;

        try {
            Map<String, String[]> paramMap = prcontext.getRequest().getParameterMap();
            if (paramMap.containsKey("removePP")) {
                UIPortal uiPortal = Util.getUIPortal();
                for (String publicParamName : paramMap.get("removePP")) {
                    uiPortal.getPublicParameters().remove(publicParamName);
                }
            }

            RenderInvocation renderInvocation = uicomponent.create(RenderInvocation.class, prcontext);
View Full Code Here

Examples of org.exoplatform.portal.webui.portal.UIPortal

    /**
     * This methods return the public render parameters names supported by the targeted portlet; in other words, it sorts the
     * full public render params list and only return the ones that the current portlet can handle
     */
    public List<String> getPublicRenderParamNames() {
        UIPortal uiPortal = Util.getUIPortal();
        Map<String, String[]> publicParams = uiPortal.getPublicParameters();

        List<String> publicParamsSupportedByPortlet = new ArrayList<String>();
        if (publicParams != null) {
            Set<String> keys = publicParams.keySet();
            for (String key : keys) {
View Full Code Here

Examples of org.exoplatform.portal.webui.portal.UIPortal

        return new ArrayList<String>();
    }

    public Map<String, String[]> getPublicParameters() {
        Map<String, String[]> publicParamsMap = new HashMap<String, String[]>();
        UIPortal uiPortal = Util.getUIPortal();
        Map<String, String[]> publicParams = uiPortal.getPublicParameters();
        Set<String> allPublicParamsNames = publicParams.keySet();
        List<String> supportedPublicParamNames = getPublicRenderParamNames();

        for (String oneOfAllParams : allPublicParamsNames) {
            if (supportedPublicParamNames.contains(oneOfAllParams)) {
View Full Code Here

Examples of org.exoplatform.portal.webui.portal.UIPortal

            if (!userACL.hasEditPermission(page)) {
                uiApp.addMessage(new ApplicationMessage("UIPageBrowser.msg.delete.NotDelete", new String[] { id }, 1));
                return;
            }

            UIPortal uiPortal = Util.getUIPortal();
            UserNode userNode = uiPortal.getSelectedUserNode();
            boolean isDeleteCurrentPage = page.getKey().equals(userNode.getPageRef());

            service.getPageService().destroyPage(page.getKey());
            // Minh Hoang TO: The cached UIPage objects corresponding to removed Page should be removed here.
            // As we have multiple UIPortal, which means multiple caches of UIPage. It 's unwise to garbage
            // all UIPage caches at once. Better solution is to clear UIPage on browsing to PageNode having Page
            // removed

            if (isDeleteCurrentPage) {
                SiteKey siteKey = userNode.getNavigation().getKey();
                PageNodeEvent<UIPortalApplication> pnevent = new PageNodeEvent<UIPortalApplication>(
                        Util.getUIPortalApplication(), PageNodeEvent.CHANGE_NODE, siteKey, userNode.getURI());
                uiPortal.broadcast(pnevent, Phase.PROCESS);
            } else {
                boolean dataAvailable = uiPageBrowser.feedDataWithQuery(uiPageBrowser.getLastQuery());
                if (!dataAvailable) {
                    showNoResultMessagePopup();
                }
View Full Code Here

Examples of org.exoplatform.portal.webui.portal.UIPortal

                    // Update navigation and UserToolbarGroupPortlet

                    String pageRef = page.getKey().format();
                    if (pageRef != null && pageRef.length() > 0) {
                        // Remove from cache
                        UIPortal uiPortal = Util.getUIPortal();
                        uiPortal.clearUIPage(pageRef);
                    }

                    // Update UserToolbarDashboardPortlet
                    ActionResponse actResponse = event.getRequestContext().getResponse();
                    actResponse.setEvent(new QName("NavigationChange"), userNode.getName());
View Full Code Here

Examples of org.exoplatform.portal.webui.portal.UIPortal

    }

    protected void updateUIPortal(Event<? extends UIPageWizard> event) {
        PortalRequestContext pcontext = (PortalRequestContext) event.getRequestContext();

        UIPortal uiPortal = Util.getUIPortal();
        uiPortal.setRenderSibling(UIPortal.class);
        pcontext.ignoreAJAXUpdateOnPortlets(true);
    }
View Full Code Here

Examples of org.exoplatform.portal.webui.portal.UIPortal

        public void execute(Event<UIPageWizard> event) throws Exception {
            UIPortalApplication uiPortalApp = event.getSource().getAncestorOfType(UIPortalApplication.class);
            uiPortalApp.setModeState(UIPortalApplication.NORMAL_MODE);
            PortalRequestContext pcontext = (PortalRequestContext) event.getRequestContext();

            UIPortal uiPortal = Util.getUIPortal();
            uiPortal.setRenderSibling(UIPortal.class);
            pcontext.ignoreAJAXUpdateOnPortlets(true);

            UIWorkingWorkspace uiWorkingWS = uiPortalApp.getChildById(UIPortalApplication.UI_WORKING_WS_ID);
            uiWorkingWS.findFirstComponentOfType(UIPortalComposer.class).setRendered(false);
            uiWorkingWS.setRenderedChild(UIPortalApplication.UI_VIEWING_WS_ID);
View Full Code Here

Examples of org.exoplatform.portal.webui.portal.UIPortal

    public void refreshCachedUI() throws Exception {
        DataStorage storage = this.getApplicationComponent(DataStorage.class);
        all_UIPortals.clear();

        UIPortal uiPortal = getCurrentSite();
        if (uiPortal != null) {
            SiteKey siteKey = uiPortal.getSiteKey();

            UIPortal tmp = null;
            PortalConfig portalConfig = storage.getPortalConfig(siteKey.getTypeName(), siteKey.getName());
            if (portalConfig != null) {
                tmp = this.createUIComponent(UIPortal.class, null, null);
                PortalDataMapper.toUIPortal(tmp, portalConfig);
                this.putCachedUIPortal(tmp);
                tmp.setNavPath(uiPortal.getNavPath());
                tmp.refreshUIPage();

                setCurrentSite(tmp);
                if (SiteType.PORTAL.equals(siteKey.getType())) {
                    PortalRequestContext pcontext = Util.getPortalRequestContext();
                    if (pcontext != null) {
View Full Code Here

Examples of org.exoplatform.portal.webui.portal.UIPortal

     */
    public Set<Skin> getPortletSkins() {
        // Determine portlets visible on the page
        List<UIPortlet> uiportlets = new ArrayList<UIPortlet>();
        UIWorkingWorkspace uiWorkingWS = getChildById(UI_WORKING_WS_ID);
        UIPortal uiPortal = uiWorkingWS.findFirstComponentOfType(UIPortal.class);
        uiPortal.findComponentOfType(uiportlets, UIPortlet.class);
        UIPortalToolPanel toolPanel = uiWorkingWS.findFirstComponentOfType(UIPortalToolPanel.class);
        if (toolPanel != null && toolPanel.isRendered()) {
            toolPanel.findComponentOfType(uiportlets, UIPortlet.class);
        }

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.