Package org.jboss.dashboard.ui

Examples of org.jboss.dashboard.ui.NavigationManager


    /**
     * Get the dashboard for the current page.
     */
    public synchronized Dashboard getCurrentDashboard() {
        NavigationManager navMgr = NavigationManager.lookup();
        Dashboard dashboard = getDashboard(navMgr.getCurrentSection());
        if (dashboard == null) return null// When a section is being deleted the current section is null.
       
        if (currentDashboard == null) return currentDashboard = dashboard;
        if (dashboard.equals(currentDashboard)) return currentDashboard;

View Full Code Here


            for (int i = 0; i < getHeaderIncludePages().length; i++) {
                result.add(getHeaderIncludePages()[i]);
            }
        }

        NavigationManager navigationManager = NavigationManager.lookup();
        if (navigationManager != null && navigationManager.getCurrentSection() != null) {
            Set panels = navigationManager.getCurrentSection().getPanels();
            if (panels != null) {
                for (Iterator it = panels.iterator(); it.hasNext();) {
                    Panel panel = (Panel) it.next();
                    String page = panel.getProvider().getPage(PanelDriver.PAGE_HEADER);
                    if (page != null && !"".equals(page.trim()) && !result.contains(page)) result.add(page);
View Full Code Here

    public synchronized void deleteSection(final WorkspaceImpl workspace, final Section section) {
        SectionPermission sectionPerm = SectionPermission.newInstance(section, SectionPermission.ACTION_DELETE);
        try {
            if (getUserStatus().hasPermission(sectionPerm)) {
                NavigationManager navigationManager = getNavigationManager();
                if (navigationManager.getCurrentSectionId() != null) {
                    if (navigationManager.getCurrentSectionId().equals(section.getDbid())) {
                        navigationManager.setCurrentSection(null);
                    }
                    navigationManager.setCurrentWorkspace(workspace);
                }

                workspace.removeSection(section);
                UIServices.lookup().getWorkspacesManager().store(workspace);
            }
View Full Code Here

    /**
     * Get the dashboard for the current page.
     */
    public synchronized Dashboard getCurrentDashboard() {
        NavigationManager navMgr = NavigationManager.lookup();
        Dashboard dashboard = getDashboard(navMgr.getCurrentSection());
        if (dashboard == null) return null// When a section is being deleted the current section is null.
       
        if (currentDashboard == null) return currentDashboard = dashboard;
        if (dashboard.equals(currentDashboard)) return currentDashboard;

View Full Code Here

import org.jboss.dashboard.ui.controller.RequestContext;

public class RequestRenderer extends RequestChainProcessor {

    protected boolean processRequest() throws Exception {
        NavigationManager navigationManager = NavigationManager.lookup();
        navigationManager.freezeNavigationStatus();
        final CommandResponse cmdResponse = getControllerStatus().getResponse();
        final CommandRequest cmdRequest = RequestContext.getCurrentContext().getRequest();
        return cmdResponse.execute(cmdRequest);
    }
View Full Code Here

     * @see javax.servlet.jsp.tagext.TagSupport
     */
    public int doEndTag() throws JspTagException {
        Panel panel;
        if (this.panel != null) {
            NavigationManager navigationManager = NavigationManager.lookup();
            panel = navigationManager.getCurrentSection().getPanel(this.panel);
        } else {
            panel = (Panel) pageContext.getRequest().getAttribute(Parameters.RENDER_PANEL);
        }
        URLMarkupGenerator markupGenerator = UIServices.lookup().getUrlMarkupGenerator();
        String linkStr = markupGenerator.getLinkToPanelAction(panel, getAction(), params, Boolean.valueOf(useFriendlyUrl).booleanValue());
View Full Code Here

        return DashboardHandler.lookup().getDashboard(getDrillDownPage());
    }

    public Section getDrillDownPage() {
        if (!isDrillDownEnabled()) return null;
        NavigationManager navMgr = NavigationManager.lookup();
        return navMgr.getCurrentWorkspace().getSection(sectionId);
    }
View Full Code Here

        boolean modalSwitchedOff = modalOnBeforeRequest && !modalOn;

         // Check if the navigation has changed (f.i: URL typing) and so auto-close the modal (if was opened).
        if (modalOn) {
            if (!modalSwitchedOn) {
                NavigationManager navMgr = NavigationManager.lookup();
                boolean navigationChanged = false;
                boolean configEnabled = navMgr.isShowingConfig();
                boolean wasConfigEnabled = modalStatus.isConfigEnabled();
                String currentWorkspaceId = navMgr.getCurrentWorkspaceId();
                String oldWorkspaceId = modalStatus.getCurrentWorkspaceId();
                Long currentSectionId = navMgr.getCurrentSectionId();
                Long oldSectionId = modalStatus.getCurrentSectionId();
                if (configEnabled != wasConfigEnabled) navigationChanged = true;
                if (ComparatorUtils.compare(currentWorkspaceId, oldWorkspaceId, 1) != 0) navigationChanged = true;
                if (ComparatorUtils.compare(currentSectionId, oldSectionId, 1) != 0) navigationChanged = true;
View Full Code Here

    protected Panel getCurrentPanel() throws Exception {
        final String idPanel = getRequest().getParameter(Parameters.DISPATCH_IDPANEL);
        if (idPanel == null) return null;
        Long id = Long.decode(idPanel);

        NavigationManager navMgr = NavigationManager.lookup();
        Panel[] panels =  navMgr.getCurrentSection().getAllPanels();
        for (int i = 0; i < panels.length; i++) {
            Panel panel = panels[i];
            if (panel.getPanelId().equals(id)) return panel;
        }
        return null;
View Full Code Here

        boolean modalSwitchedOff = modalOnBeforeRequest && !modalOn;

         // Check if the navigation has changed (f.i: URL typing) and so auto-close the modal (if was opened).
        if (modalOn) {
            if (!modalSwitchedOn) {
                NavigationManager navMgr = NavigationManager.lookup();
                boolean navigationChanged = false;
                boolean configEnabled = navMgr.isShowingConfig();
                boolean wasConfigEnabled = modalStatus.isConfigEnabled();
                String currentWorkspaceId = navMgr.getCurrentWorkspaceId();
                String oldWorkspaceId = modalStatus.getCurrentWorkspaceId();
                Long currentSectionId = navMgr.getCurrentSectionId();
                Long oldSectionId = modalStatus.getCurrentSectionId();
                if (configEnabled != wasConfigEnabled) navigationChanged = true;
                if (ComparatorUtils.compare(currentWorkspaceId, oldWorkspaceId, 1) != 0) navigationChanged = true;
                if (ComparatorUtils.compare(currentSectionId, oldSectionId, 1) != 0) navigationChanged = true;
View Full Code Here

TOP

Related Classes of org.jboss.dashboard.ui.NavigationManager

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.