Package org.jboss.dashboard.workspace

Examples of org.jboss.dashboard.workspace.Section


        if (isShowable(section)) {
            if (hasVisibleChildren(section) && isOpen(section)) {
                renderFragment("beforeTabulation");
                List children = section.getChildren();
                for (int i = 0; i < children.size(); i++) {
                    Section childSection = (Section) children.get(i);
                    setAttribute("checked", isChecked(childSection));
                    setAttribute("sectionName", getLocalizedValue(childSection.getTitle()));
                    setAttribute("pageId", childSection.getId());
                    renderFragment("childrenStart");
                    renderSectionEditionMode(childSection, level + 1);
                }
                renderFragment("afterTabulation");
            }
View Full Code Here


                renderTabulation();
                renderFragment("afterTabulation");
                renderFragment("childrenStart");
                List children = section.getChildren();
                for (int i = 0; i < children.size(); i++) {
                    Section childSection = (Section) children.get(i);
                    renderSection(childSection, level + 1);
                }
                renderFragment("childrenEnd");
            }
            renderFragment("pageEnd");
View Full Code Here

     */
    public boolean hasVisibleChildren(Section section) {
        List l = section.getChildren();
        if (l == null) return false;
        for (int i = 0; i < l.size(); i++) {
            Section childSection = (Section) l.get(i);
            if (isShowable(childSection))
                return true;
        }
        return false;
    }
View Full Code Here

        return false;
    }

    protected List calculateOpenSections() {
        List l = new ArrayList();
        Section currentSection = getSection();
        if (currentSection != null) {
            l.add(currentSection.getId());
            Section s = currentSection;
            while ((s = s.getParent()) != null) {
                l.add(s.getId());
            }
        }
        return l;
    }
View Full Code Here

        String allSectionsOpenStr = (String) getParameter("allSectionsOpen");
        allSectionsOpen = allSectionsOpenStr != null && Boolean.valueOf(allSectionsOpenStr).booleanValue();

        String markOppenedSections = getPanel().getParameterValue(TreeMenuDriver.PARAM_MARK_OPENED_SECTIONS);

        Section section = getSection();
        openedPages.add(section.getDbid());


        if (Boolean.parseBoolean(markOppenedSections)) {
            while ((section = section.getParent()) != null) {
                openedPages.add(section.getDbid());
            }
        }

        WorkspaceImpl workspace = (WorkspaceImpl) getWorkspace();
        Section[] rootSections = workspace.getAllRootSections();
        renderFragment("outputStart");
        if (isEditMode) {
            if (rootSections != null) {
                for (int i = 0; i < rootSections.length; i++) {
                    Section rootSection = rootSections[i];
                    setAttribute("pageId", rootSection.getId());
                    setAttribute("checked", isChecked(rootSection));
                    setAttribute("sectionName", getLocalizedValue(rootSection.getTitle()));
                    renderFragment("pageStart");
                    renderSectionEditionMode(rootSection, 1);
                    renderFragment("pageEnd");
                }
            }
        } else {
            if (rootSections != null) {
                for (int i = 0; i < rootSections.length; i++) {
                    Section rootSection = rootSections[i];
                    renderSection(rootSection, 1);
                }
            }
        }
        if (isEditMode)
View Full Code Here

        if (isShowable(section)) {
            if (hasVisibleChildren(section) && isOpen(section)) {
                renderFragment("beforeTabulation");
                List children = section.getChildren();
                for (int i = 0; i < children.size(); i++) {
                    Section childSection = (Section) children.get(i);
                    setAttribute("checked", isChecked(childSection));
                    setAttribute("sectionName", getLocalizedValue(childSection.getTitle()));
                    setAttribute("pageId", childSection.getId());
                    renderFragment("childrenStart");
                    renderSectionEditionMode(childSection, level + 1);
                }
                renderFragment("afterTabulation");
            }
View Full Code Here

                renderTabulation();
                renderFragment("afterTabulation");
                renderFragment("childrenStart");
                List children = section.getChildren();
                for (int i = 0; i < children.size(); i++) {
                    Section childSection = (Section) children.get(i);
                    renderSection(childSection, level + 1);
                }
                renderFragment("childrenEnd");
            }
            renderFragment("pageEnd");
View Full Code Here

     */
    public boolean hasVisibleChildren(Section section) {
        List l = section.getChildren();
        if (l == null) return false;
        for (int i = 0; i < l.size(); i++) {
            Section childSection = (Section) l.get(i);
            if (isShowable(childSection))
                return true;
        }
        return false;
    }
View Full Code Here

        return false;
    }

    protected List calculateOpenSections() {
        List l = new ArrayList();
        Section currentSection = getSection();
        if (currentSection != null) {
            l.add(currentSection.getId());
            Section s = currentSection;
            while ((s = s.getParent()) != null) {
                l.add(s.getId());
            }
        }
        return l;
    }
View Full Code Here

     * elements. But hierarchy applies: Panel elements may hide section ones, workspace ones and global ones.
     * Assume current workspace, section and panel.
     */
    public GraphicElement[] getAvailableElements() {
        Workspace workspace = NavigationManager.lookup().getCurrentWorkspace();
        Section section = NavigationManager.lookup().getCurrentSection();
        RequestContext reqCtx = RequestContext.getCurrentContext();
        Long idPanel = null;
        Panel panel = (Panel) reqCtx.getRequest().getRequestObject().getAttribute(Parameters.RENDER_PANEL);
        if (panel != null && section != null) {
            idPanel = panel.getPanelId();
            if (getElementScopeDescriptor().isAllowedInstance()) {
                idPanel = panel.getInstanceId();
            }
        }
        return getAvailableElements(workspace == null ? null : workspace.getId(), section == null ? null : section.getId(), panel == null ? null : idPanel);
    }
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.