Package com.psddev.dari.util

Examples of com.psddev.dari.util.HtmlGrid


    }

    private void writeArea(HttpServletRequest request, Object area, Object value) throws IOException, ServletException {
        if (layoutTag != null && areas != null) {
            if (!ObjectUtils.isBlank(area)) {
                HtmlGrid oldGrid = (HtmlGrid) request.getAttribute("grid");
                Object oldGridArea = request.getAttribute("gridArea");
                StringWriter body = new StringWriter();
                boolean contextSet = false;

                try {
                    HtmlGrid grid = layoutTag.getGrid(request, area);
                    Object gridArea = layoutTag.getAreaName(request, area);

                    if (grid != null) {
                        String context = grid.getContexts().get(String.valueOf(gridArea));

                        if (!ObjectUtils.isBlank(context)) {
                            contextSet = true;
                            ContextTag.Static.pushContext(request, context);
                        }
View Full Code Here


    }

    @Override
    protected void beforeSave() {
        for (GridLayout l : getLayouts()) {
            new HtmlGrid(l.getTemplate());
        }
    }
View Full Code Here

            HtmlWriter writer)
            throws IOException {

        String cssClass = "_gl-" + getId();
        int maxSize = 0;
        HtmlGrid maxGrid = null;

        writer.writeStart("style", "type", "text/css");
            writer.writeCommonGridCss();

            for (GridLayout l : getLayouts()) {
                HtmlGrid grid = new HtmlGrid(l.getTemplate());
                int size = grid.getAreas().size();
                String prefix = l.getPrefix();

                if (maxSize < size) {
                    maxSize = size;
                    maxGrid = grid;
View Full Code Here

        if (area instanceof Integer) {
            int areaInt = (Integer) area;
            int gridOffset = 0;

            for (CssClassHtmlGrid entry : cssGrids) {
                HtmlGrid grid = entry.grid;
                int gridAreaSize = entry.grid.getAreas().size();

                if (areaInt < gridOffset + gridAreaSize) {
                    return grid;
View Full Code Here

                            if (grids == null) {
                                grids = HtmlGrid.Static.findAll(context, request);
                                request.setAttribute(GRIDS_ATTRIBUTE, grids);
                            }

                            HtmlGrid grid = grids.get("." + cssClass);

                            if (grid != null) {
                                cssGrids.add(new CssClassHtmlGrid(cssClassString, grid));
                                gridCssClasses.add(cssClass);
                            }
View Full Code Here

                int areaSize = areasList.size();
                int gridOffset = 0;

                for (CssClassHtmlGrid cssGrid : cssGrids) {
                    String cssClass = cssGrid.cssClass;
                    HtmlGrid grid = cssGrid.grid;
                    Map<String, GridItem> items = new LinkedHashMap<String, GridItem>();
                    int gridAreaSize = grid.getAreas().size();

                    for (Map.Entry<String, Object> areaEntry : areas.entrySet()) {
                        items.put(areaEntry.getKey(), new GridItem(areaEntry.getValue()));
                    }
View Full Code Here

TOP

Related Classes of com.psddev.dari.util.HtmlGrid

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.