Package org.jboss.dashboard.workspace

Examples of org.jboss.dashboard.workspace.Section


     * Get the elements manageable for a given context. These are the base elements plus the workspace, section and panel
     * elements. Assume current workspace, section and panel.
     */
    public GraphicElement[] getManageableElements() {
        Workspace workspace = NavigationManager.lookup().getCurrentWorkspace();
        Section section = NavigationManager.lookup().getCurrentSection();
        Object panelObject = SessionManager.getCurrentPanel();//TODO : Current panel won't be set!
        Panel panel = null;
        if (panelObject != null && panelObject instanceof Panel)
            panel = (Panel) panelObject;
        return getManageableElements(workspace == null ? null : workspace.getId(), section == null ? null : section.getId(), panel == null ? null : panel.getPanelId());
    }
View Full Code Here


    public List<Section> getSectionsWithKPIs(WorkspaceImpl workspace) throws Exception {
        DashboardHandler dashboardHandler = DashboardHandler.lookup();
        List<Section> results = new ArrayList<Section>();
        Iterator sectionIt = workspace.getSections().iterator();
        while (sectionIt.hasNext()) {
            Section section = (Section) sectionIt.next();
            if (dashboardHandler.containsKPIs(section)) {
                results.add(section);
            }
        }
        return results;
View Full Code Here

    }

    protected List listChildren() {
        List childrenNodes = new ArrayList();
        try {
            Section s = getSection();
            List children = s.getChildren();
            for (int i = 0; i < children.size(); i++) {
                Section section = (Section) children.get(i);
                childrenNodes.add(getNewSectionNode(section));
            }
        } catch (Exception e) {
            log.error("Error: ", e);
        }
View Full Code Here

        }
        return childrenNodes;
    }

    protected boolean hasDynamicChildren() {
        Section s = null;
        try {
            s = getSection();
            List children = s.getChildren();
            return !children.isEmpty();
        } catch (Exception e) {
            log.error("Error: ", e);
        }
        return false;
View Full Code Here

        return false;
    }

    protected TreeNode listChildrenById(String id) {
        try {
            Section s = ((WorkspaceImpl) getWorkspace()).getSection(Long.decode(id));
            if (getSectionId().equals(s.getParentSectionId())) {
                return getNewSectionNode(s);
            }
        } catch (Exception e) {
            log.error("Error: ", e);
        }
View Full Code Here

    }

    protected void readSectionValues() {
        try {

            Section section = getWorkspace().getSection(sectionId);
            if (section.getTitle().get(lang) == null) {
                setTitle((String) section.getTitle().get(LocaleManager.lookup().getDefaultLang()));
            } else {
                setTitle((String) section.getTitle().get(lang));

            }

            setTitleMap(section.getTitle());
            setVisible(section.isVisible().booleanValue());
            setEnvelope(section.getEnvelopeId());
            setSkin(section.getSkinId());
            setUrl(section.getFriendlyUrl());
            setLayout(section.getLayoutId());
            setEnvelope(section.getEnvelopeId());
            setRegionsCellSpacing(section.getRegionsCellSpacing().intValue());
            setPanelsCellSpacing(section.getPanelsCellSpacing().intValue());

        } catch (Exception e) {
            SectionPropertiesHandler.log.error("Error: ", e);
        }
    }
View Full Code Here

        }

        setTitle((String) setLangTitle(request).get(LocaleManager.lookup().getDefaultLang()));
        if (validateBeforeEdition()) {
            try {
                final Section section = getSection();
                section.setTitle(setLangTitle(request));
                section.setVisible(Boolean.valueOf(visible));
                section.setSkinId(skin);
                section.setEnvelopeId(envelope);
                url = ("".equals(url)) ? null : url;
                section.setFriendlyUrl(url);
                section.setRegionsCellSpacing(new Integer(regionsCellSpacing));
                section.setPanelsCellSpacing(new Integer(panelsCellSpacing));
                section.setLayoutId(layout);


                HibernateTxFragment txFragment = new HibernateTxFragment() {
                    protected void txFragment(Session session) throws Exception {
                        UIServices.lookup().getSectionsManager().store(section);
View Full Code Here

    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

                idPanel = panel.getPanelId().toString();
            }
        }
        Panel panel = null;
        if (idPanel != null) {
            Section currSection = NavigationManager.lookup().getCurrentSection();
            if (currSection != null) {
                panel = currSection.getPanel(idPanel);
            }
        }

        if (key != null && panel != null) {
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 children = parentSection.getChildren();
                rootSections = (Section[]) children.toArray(new Section[children.size()]);
            }
            renderFragment("outputStart");
            for (int i = 0; i < rootSections.length; i++) {
                Section rootSection = rootSections[i];
                renderSection(httpServletRequest, httpServletResponse, rootSection, visibleIds, checkedIds, selectableIds, Boolean.TRUE.equals(checkPermissions), showHiddenPages);
            }
            renderFragment("outputEnd");
        } catch (Exception e) {
            log.error("Error rendering sections: ", e);
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.