Package org.jboss.dashboard.workspace

Examples of org.jboss.dashboard.workspace.Section


    public int doEndTag() throws JspTagException {

        WorkspaceImpl workspace = NavigationManager.lookup().getCurrentWorkspace();

        if (workspace != null) {
            Section section = workspace.getSection(getSection());

            if (section != null) {
                String linkStr = getLink((HttpServletRequest) pageContext.getRequest(), (HttpServletResponse) pageContext.getResponse(), section);
                try {
                    pageContext.getOut().print(StringEscapeUtils.escapeHtml(linkStr));
View Full Code Here


    public void statusChanged(UserStatus us) {
        if (us.isRootUser()) return;

        WorkspaceImpl currentWorkspace = NavigationManager.lookup().getCurrentWorkspace();
        if (currentWorkspace != null && currentWorkspace.getHomeSearchMode() == Workspace.SEARCH_MODE_ROLE_HOME_PREFERENT) {
            Section section = currentWorkspace.getDefaultHomePageForRole(us.getUserRoleIds().iterator().next());
            if (section != null) {
                NavigationManager.lookup().setCurrentSection(section);
            }
        }

        if (us.isAnonymous()) {
            // Reposition, and invoke page left in _destination_ page
            Section currentPage = NavigationManager.lookup().getCurrentSection();
            if (currentPage != null) {
                Set<Panel> panels = currentPage.getPanels();
                if (panels != null) {
                    for (Panel panel : panels) {
                        panel.pageLeft();
                    }
                }
View Full Code Here

        String workspaceId = request.getRequestObject().getParameter("idWorkspace");
        String pageId = request.getRequestObject().getParameter("idSection");
        try {
            if (!StringUtils.isEmpty(workspaceId) && !StringUtils.isEmpty(pageId)) {
                WorkspaceImpl workspace = (WorkspaceImpl) UIServices.lookup().getWorkspacesManager().getWorkspace(workspaceId);
                Section page = workspace.getSection(Long.decode(pageId));
                getNavigatorManager().setCurrentSection(page);
            }
        } catch (Exception e) {
            log.error("Error in beforeInvokeAction: ", e);
        }
View Full Code Here

                    pageContext.getRequest().setAttribute("layoutRegion", layoutRegion);
                    jspInclude(pageStr);
                    pageContext.getRequest().removeAttribute("layoutRegion");
                } else {
                    // NORMAL DISPLAY
                    Section section = NavigationManager.lookup().getCurrentSection();
                    if (section != null) {
                        LayoutRegion layoutRegion = section.getLayout().getRegion(getRegion());
                        if (layoutRegion != null) {
                            String pageStr = UISettings.lookup().getRegionRenderPage();
                            log.debug("REGION TAG: INCLUDING (" + layoutRegion.getId() + ") " + pageStr);
                            jspInclude(pageStr);
                        }
View Full Code Here

            WorkspaceImpl currentWorkspace = (WorkspaceImpl) (workspaceId != null && !"".equals(workspaceId) ? UIServices.lookup().getWorkspacesManager().getWorkspace(workspaceId) : NavigationManager.lookup().getCurrentWorkspace());
            Section[] rootSections;
            if (StringUtils.isEmpty(rootSectionId)) {
                rootSections = currentWorkspace.getAllRootSections();
            } else {
                Section parentSection  = currentWorkspace.getSection(Long.decode(rootSectionId));
                List<Section> children = parentSection.getChildren();
                rootSections = children.toArray(new Section[children.size()]);
            }
            renderFragment("outputStart");
            for (Section rootSection : rootSections) {
                renderSection(httpServletRequest, httpServletResponse, rootSection, visibleIds, checkedIds, selectableIds, Boolean.TRUE.equals(checkPermissions), showHiddenPages);
View Full Code Here

    public static Panel getPanelForKey(WorkspaceImpl workspace, String key) {
        try {
            int first = key.indexOf('@');
            String panelId = key.substring(0, first);
            String sectionId = key.substring(first + 1);
            Section section = workspace.getSection(Long.decode(sectionId));
            Panel panel = section.getPanel(panelId);
            return panel;
        } catch (Exception e) {
            log.error("Invalid panel key " + key);
        }
        return null;
View Full Code Here

    public static Panel getPanelForKey(WorkspaceImpl workspace, String key) {
        try {
            int first = key.indexOf('@');
            String panelId = key.substring(0, first);
            String sectionId = key.substring(first + 1);
            Section section = workspace.getSection(Long.decode(sectionId));
            Panel panel = section.getPanel(panelId);
            return panel;
        } catch (Exception e) {
            log.error("Invalid panel key " + key);
        }
        return null;
View Full Code Here

        sectionsPropertiesHandler.setSelectedSectionId(getNavigationManager().getCurrentSection().getId().toString());
        navigateToConfigPath(getParsedValue(newPagePath));
    }

    public void actionPageConfig(CommandRequest request) throws Exception {
        Section section = getNavigationManager().getCurrentSection();
        SectionPermission sectionPerm = SectionPermission.newInstance(section, SectionPermission.ACTION_EDIT);
        getUserStatus().checkPermission(sectionPerm);
        setWorkspaceValues(request);
        navigateToConfigPath(getParsedValue(section.getParent() != null ? childPageConfigPath : pageConfigPath));
    }
View Full Code Here

        setWorkspaceValues(request);
        navigateToConfigPath(getParsedValue(section.getParent() != null ? childPageConfigPath : pageConfigPath));
    }

    public void actionPageConfigFromTree(CommandRequest request, WorkspaceImpl workspace) throws Exception {
        Section section = workspace.getSection(new Long(request.getParameter("id")));
        SectionPermission sectionPerm = SectionPermission.newInstance(section, SectionPermission.ACTION_EDIT);
        getUserStatus().checkPermission(sectionPerm);
        setWorkspaceValuesFromTree(workspace, section, null);
        navigateToConfigPath(getParsedValue(pageConfigPath));
    }
View Full Code Here

        }
        return path;
    }

    protected String getSectionIds(String workspaceId, Long sectionId) throws Exception {
        Section section = ((WorkspaceImpl) UIServices.lookup().getWorkspacesManager().getWorkspace(workspaceId)).getSection(sectionId);
        StringBuffer sb = new StringBuffer();
        while (section != null) {
            sb.insert(0, section.getId());
            section = section.getParent();
            if (section != null) {
                sb.insert(0, "/");
            }
        }
        return sb.toString();
View Full Code Here

TOP

Related Classes of org.jboss.dashboard.workspace.Section

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.