Package org.jboss.dashboard.workspace

Examples of org.jboss.dashboard.workspace.LayoutRegion


                String preview = (String) pageContext.getRequest().getAttribute("org.jboss.dashboard.ui.taglib.RegionTag.preview");
                if (preview != null && preview.trim().equalsIgnoreCase("true")) {
                    //PREVIEW
                    String layoutId = (String) pageContext.getRequest().getAttribute("org.jboss.dashboard.ui.taglib.RegionTag.layout");
                    Layout layout = (Layout) UIServices.lookup().getLayoutsManager().getAvailableElement(layoutId);
                    LayoutRegion layoutRegion = layout.getRegion(region);
                    String pageStr = "/section/render_region.jsp";

                    int dotIndex = pageStr.lastIndexOf('.');
                    pageStr = pageStr.substring(0, dotIndex) + "_preview" + pageStr.substring(dotIndex, pageStr.length());
                    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);
                        }
                    }
                }
            }}.execute();
View Full Code Here


            Element element = (Element) iterator.next();
            String type = element.getChildTextTrim("type");
            String idRegion = element.getAttributeValue("id");

            // Build new region
            LayoutRegion layoutRegion = new LayoutRegion();
            layoutRegion.setId(idRegion);
            if ("column".equalsIgnoreCase(type))
                layoutRegion.setType(LayoutRegion.COLUMN);
            else if ("tabs".equalsIgnoreCase(type))
                layoutRegion.setType(LayoutRegion.TABBED);
            else if ("row".equalsIgnoreCase(type))
                layoutRegion.setType(LayoutRegion.ROW);

            List params = element.getChildren("param");
            for (Iterator iteratorParams = params.iterator(); iteratorParams.hasNext();) {
                Element elementParams = (Element) iteratorParams.next();
                String idParam = elementParams.getAttributeValue("id");
                String value = elementParams.getAttributeValue("value");
                layoutRegion.getRenderAttributes().put(idParam, value);
            }
            results.add(layoutRegion);
        }
        log.debug("Regions loaded from xml: " + results);
        return results;
View Full Code Here

            Element element = (Element) iterator.next();
            String type = element.getChildTextTrim("type");
            String idRegion = element.getAttributeValue("id");

            // Build new region
            LayoutRegion layoutRegion = new LayoutRegion();
            layoutRegion.setId(idRegion);
            if ("column".equalsIgnoreCase(type))
                layoutRegion.setType(LayoutRegion.COLUMN);
            else if ("tabs".equalsIgnoreCase(type))
                layoutRegion.setType(LayoutRegion.TABBED);
            else if ("row".equalsIgnoreCase(type))
                layoutRegion.setType(LayoutRegion.ROW);

            List params = element.getChildren("param");
            for (Iterator iteratorParams = params.iterator(); iteratorParams.hasNext();) {
                Element elementParams = (Element) iteratorParams.next();
                String idParam = elementParams.getAttributeValue("id");
                String value = elementParams.getAttributeValue("value");
                layoutRegion.getRenderAttributes().put(idParam, value);
            }
            results.add(layoutRegion);
        }
        log.debug("Regions loaded from xml: " + results);
        return results;
View Full Code Here

    public LayoutRegion getRegion(String id) {
        if (id == null)
            return null;
        Iterator it = regions.iterator();
        while (it.hasNext()) {
            LayoutRegion r = (LayoutRegion) it.next();
            if (r.getId() != null && r.getId().equals(id))
                return r;
        }
        return null;
    }
View Full Code Here

            Element element = (Element) iterator.next();
            String type = element.getChildTextTrim("type");
            String idRegion = element.getAttributeValue("id");

            // Build new region
            LayoutRegion layoutRegion = new LayoutRegion();
            layoutRegion.setId(idRegion);
            if ("column".equalsIgnoreCase(type))
                layoutRegion.setType(LayoutRegion.COLUMN);
            else if ("tabs".equalsIgnoreCase(type))
                layoutRegion.setType(LayoutRegion.TABBED);
            else if ("row".equalsIgnoreCase(type))
                layoutRegion.setType(LayoutRegion.ROW);

            List params = element.getChildren("param");
            for (Iterator iteratorParams = params.iterator(); iteratorParams.hasNext();) {
                Element elementParams = (Element) iteratorParams.next();
                String idParam = elementParams.getAttributeValue("id");
                String value = elementParams.getAttributeValue("value");
                layoutRegion.getRenderAttributes().put(idParam, value);
            }
            results.add(layoutRegion);
        }
        log.debug("Regions loaded from xml: " + results);
        return results;
View Full Code Here

    public LayoutRegion getRegion(String id) {
        if (id == null)
            return null;
        Iterator it = regions.iterator();
        while (it.hasNext()) {
            LayoutRegion r = (LayoutRegion) it.next();
            if (r.getId() != null && r.getId().equals(id))
                return r;
        }
        return null;
    }
View Full Code Here

                String preview = (String) pageContext.getRequest().getAttribute("org.jboss.dashboard.ui.taglib.RegionTag.preview");
                if (preview != null && preview.trim().equalsIgnoreCase("true")) {
                    //PREVIEW
                    String layoutId = (String) pageContext.getRequest().getAttribute("org.jboss.dashboard.ui.taglib.RegionTag.layout");
                    Layout layout = (Layout) UIServices.lookup().getLayoutsManager().getAvailableElement(layoutId);
                    LayoutRegion layoutRegion = layout.getRegion(region);
                    String pageStr = "/section/render_region.jsp";

                    int dotIndex = pageStr.lastIndexOf('.');
                    pageStr = pageStr.substring(0, dotIndex) + "_preview" + pageStr.substring(dotIndex, pageStr.length());
                    pageContext.getRequest().setAttribute("layoutRegion", layoutRegion);
                    pageContext.include(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 = displayConfiguration.getProperty("regionRenderPage");
                            log.debug("REGION TAG: INCLUDING (" + layoutRegion.getId() + ") " + pageStr);
                            pageContext.include(pageStr);
                        }
                    }
                }
            }}.execute();
View Full Code Here

                String preview = (String) pageContext.getRequest().getAttribute("org.jboss.dashboard.ui.taglib.RegionTag.preview");
                if (preview != null && preview.trim().equalsIgnoreCase("true")) {
                    //PREVIEW
                    String layoutId = (String) pageContext.getRequest().getAttribute("org.jboss.dashboard.ui.taglib.RegionTag.layout");
                    Layout layout = (Layout) UIServices.lookup().getLayoutsManager().getAvailableElement(layoutId);
                    LayoutRegion layoutRegion = layout.getRegion(region);
                    String pageStr = "/section/render_region.jsp";

                    int dotIndex = pageStr.lastIndexOf('.');
                    pageStr = pageStr.substring(0, dotIndex) + "_preview" + pageStr.substring(dotIndex, pageStr.length());
                    pageContext.getRequest().setAttribute("layoutRegion", layoutRegion);
                    pageContext.include(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 = displayConfiguration.getProperty("regionRenderPage");
                            log.debug("REGION TAG: INCLUDING (" + layoutRegion.getId() + ") " + pageStr);
                            pageContext.include(pageStr);
                        }
                    }
                }
            }}.execute();
View Full Code Here

                String preview = (String) pageContext.getRequest().getAttribute("org.jboss.dashboard.ui.taglib.RegionTag.preview");
                if (preview != null && preview.trim().equalsIgnoreCase("true")) {
                    //PREVIEW
                    String layoutId = (String) pageContext.getRequest().getAttribute("org.jboss.dashboard.ui.taglib.RegionTag.layout");
                    Layout layout = (Layout) UIServices.lookup().getLayoutsManager().getAvailableElement(layoutId);
                    LayoutRegion layoutRegion = layout.getRegion(region);
                    String pageStr = "/section/render_region.jsp";

                    int dotIndex = pageStr.lastIndexOf('.');
                    pageStr = pageStr.substring(0, dotIndex) + "_preview" + pageStr.substring(dotIndex, pageStr.length());
                    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 = displayConfiguration.getProperty("regionRenderPage");
                            log.debug("REGION TAG: INCLUDING (" + layoutRegion.getId() + ") " + pageStr);
                            jspInclude(pageStr);
                        }
                    }
                }
            }}.execute();
View Full Code Here

                String preview = (String) pageContext.getRequest().getAttribute("org.jboss.dashboard.ui.taglib.RegionTag.preview");
                if (preview != null && preview.trim().equalsIgnoreCase("true")) {
                    //PREVIEW
                    String layoutId = (String) pageContext.getRequest().getAttribute("org.jboss.dashboard.ui.taglib.RegionTag.layout");
                    Layout layout = (Layout) UIServices.lookup().getLayoutsManager().getAvailableElement(layoutId);
                    LayoutRegion layoutRegion = layout.getRegion(region);
                    String pageStr = "/section/render_region.jsp";

                    int dotIndex = pageStr.lastIndexOf('.');
                    pageStr = pageStr.substring(0, dotIndex) + "_preview" + pageStr.substring(dotIndex, pageStr.length());
                    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 = displayConfiguration.getProperty("regionRenderPage");
                            log.debug("REGION TAG: INCLUDING (" + layoutRegion.getId() + ") " + pageStr);
                            jspInclude(pageStr);
                        }
                    }
                }
            }}.execute();
View Full Code Here

TOP

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

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.