Package com.psddev.dari.util

Examples of com.psddev.dari.util.UrlBuilder


            FilterChain chain)
            throws Exception {

        if (ObjectUtils.to(boolean.class, request.getParameter("_clearPreview"))) {
            Static.removeCurrentPreview(request, response);
            response.sendRedirect(new UrlBuilder(request).
                    currentPath().
                    currentParameters().
                    parameter("_clearPreview", null).
                    toString());
            return;
View Full Code Here


        return pathWithTimestamp(servletContext, servletPath);
    }

    public static UrlBuilder absolutePath(String path) {
        return new UrlBuilder(PageContextFilter.Static.getRequest()).absolutePath(path);
    }
View Full Code Here

    public static UrlBuilder absolutePath(String path) {
        return new UrlBuilder(PageContextFilter.Static.getRequest()).absolutePath(path);
    }

    public static UrlBuilder currentPath() {
        return new UrlBuilder(PageContextFilter.Static.getRequest()).currentPath();
    }
View Full Code Here

    public static UrlBuilder currentPath() {
        return new UrlBuilder(PageContextFilter.Static.getRequest()).currentPath();
    }

    public static UrlBuilder path(String path) {
        return new UrlBuilder(PageContextFilter.Static.getRequest()).path(path);
    }
View Full Code Here

        public static boolean requireUser(ServletContext context, HttpServletRequest request, HttpServletResponse response) throws IOException {
            String toolUrlPrefix = Settings.get(String.class, ToolPageContext.TOOL_URL_PREFIX_SETTING);

            if (!ObjectUtils.isBlank(toolUrlPrefix) &&
                    !new UrlBuilder(request).
                            currentScheme().
                            currentHost().
                            currentPath().
                            toString().startsWith(toolUrlPrefix)) {

                response.sendRedirect(
                        StringUtils.removeEnd(toolUrlPrefix, "/") +
                        new UrlBuilder(request).
                                currentPath().
                                currentParameters().
                                toString());

                return true;
View Full Code Here

                    "target", "_top");

                page.writeElement("input",
                        "type", "hidden",
                        "name", "returnUrl",
                        "value", new UrlBuilder(page.getRequest()).
                                absolutePath(page.cmsUrl("/searchAdvancedFull")).
                                currentParameters());

                for (Display display : displays) {
                    page.writeElement("input", "type", "hidden", "name", FIELDS_PARAMETER, "value", display.getInternalName());
                }

                page.writeStart("table", "class", "table-bordered table-striped pageThumbnails");
                    page.writeStart("thead");
                        page.writeStart("tr");
                            page.writeStart("th");
                            page.writeEnd();

                            page.writeStart("th");
                                page.writeHtml("Type");
                            page.writeEnd();

                            page.writeStart("th");
                                page.writeHtml("Label");
                            page.writeEnd();

                            for (Display display : displays) {
                                page.writeStart("th");
                                    page.writeHtml(display.getDisplayName());
                                page.writeEnd();
                            }
                        page.writeEnd();
                    page.writeEnd();

                    page.writeStart("tbody");
                        for (Object item : items) {
                            renderRow(item);
                        }
                    page.writeEnd();
                page.writeEnd();

                page.writeStart("div", "class", "actions");
                    page.writeStart("button",
                            "class", "action icon icon-action-download",
                            "name", "action-download",
                            "value", true);

                        page.writeHtml("Export All");
                    page.writeEnd();

                    if (type != null) {
                        page.writeStart("button",
                                "class", "action icon icon-action-edit",
                                "formaction", new UrlBuilder(page.getRequest()).
                                        absolutePath(page.cmsUrl("/contentEditBulk")).
                                        currentParameters().
                                        parameter("typeId", type.getId()));

                            page.writeHtml("Bulk Edit All");
View Full Code Here

TOP

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

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.