Package com.psddev.cms.tool

Examples of com.psddev.cms.tool.ToolPageContext.writeElement()


                                    State itemState = State.getInstance(item);
                                    String permalink = itemState.as(Directory.ObjectModification.class).getPermalink();

                                    page.writeStart("tr", "data-preview-url", permalink);
                                        page.writeStart("td", "style", "width: 20px;");
                                            page.writeElement("input",
                                                    "type", "checkbox",
                                                    "name", ITEMS_PARAMETER,
                                                    "value", itemState.getId());
                                        page.writeEnd();
View Full Code Here


            page.writeStart("div", "class", "bsp-inlineEditorMain");
                page.writeStart("a",
                        "class", "bsp-inlineEditorMain_logo",
                        "target", "_blank",
                        "href", page.fullyQualifiedToolUrl(CmsTool.class, "/"));
                    page.writeElement("img",
                            "src", page.cmsUrl("/style/brightspot.png"),
                            "alt", "Brightspot",
                            "width", 104,
                            "height", 14);
                page.writeEnd();
View Full Code Here

        page.putOverride(StorageItem.class, new HtmlFormatter<StorageItem>() {
            @Override
            public void format(HtmlWriter writer, StorageItem item) throws IOException {
                ToolPageContext page = (ToolPageContext) writer;
                page.writeElement("img",
                        "height", 100,
                        "src", ImageEditor.Static.getDefault() != null ?
                                new ImageTag.Builder(item).setHeight(100).toUrl() :
                                item.getPublicUrl());
            }
View Full Code Here

                } else {
                    page.writeStart("form",
                            "class", "searchAdvancedResult",
                            "method", "post",
                            "action", page.url(null));
                        page.writeElement("input", "type", "hidden", "name", TYPE_PARAMETER, "value", type != null ? type.getId() : null);
                        page.writeElement("input", "type", "hidden", "name", PREDICATE_PARAMETER, "value", predicate);
                        page.writeElement("input", "type", "hidden", "name", "returnUrl", "value", page.url(""));

                        for (ObjectField field : fields) {
                            page.writeElement("input", "type", "hidden", "name", FIELDS_PARAMETER, "value", field.getInternalName());
View Full Code Here

                    page.writeStart("form",
                            "class", "searchAdvancedResult",
                            "method", "post",
                            "action", page.url(null));
                        page.writeElement("input", "type", "hidden", "name", TYPE_PARAMETER, "value", type != null ? type.getId() : null);
                        page.writeElement("input", "type", "hidden", "name", PREDICATE_PARAMETER, "value", predicate);
                        page.writeElement("input", "type", "hidden", "name", "returnUrl", "value", page.url(""));

                        for (ObjectField field : fields) {
                            page.writeElement("input", "type", "hidden", "name", FIELDS_PARAMETER, "value", field.getInternalName());
                        }
View Full Code Here

                            "class", "searchAdvancedResult",
                            "method", "post",
                            "action", page.url(null));
                        page.writeElement("input", "type", "hidden", "name", TYPE_PARAMETER, "value", type != null ? type.getId() : null);
                        page.writeElement("input", "type", "hidden", "name", PREDICATE_PARAMETER, "value", predicate);
                        page.writeElement("input", "type", "hidden", "name", "returnUrl", "value", page.url(""));

                        for (ObjectField field : fields) {
                            page.writeElement("input", "type", "hidden", "name", FIELDS_PARAMETER, "value", field.getInternalName());
                        }
View Full Code Here

                        page.writeElement("input", "type", "hidden", "name", TYPE_PARAMETER, "value", type != null ? type.getId() : null);
                        page.writeElement("input", "type", "hidden", "name", PREDICATE_PARAMETER, "value", predicate);
                        page.writeElement("input", "type", "hidden", "name", "returnUrl", "value", page.url(""));

                        for (ObjectField field : fields) {
                            page.writeElement("input", "type", "hidden", "name", FIELDS_PARAMETER, "value", field.getInternalName());
                        }

                        page.writeStart("ul", "class", "pagination");
                            if (result.hasPrevious()) {
                                page.writeStart("li", "class", "next");
View Full Code Here

                            if (result.getOffset() > 0 ||
                                    result.hasNext() ||
                                    result.getItems().size() > LIMITS[0]) {
                                page.writeStart("li");
                                    for (String fieldName : fieldNames) {
                                        page.writeElement("input", "type", "hidden", "name", FIELDS_PARAMETER, "value", fieldName);
                                    }

                                    page.writeStart("select",
                                            "data-bsp-autosubmit", "",
                                            "name", "limit");
View Full Code Here

            @Override
            public void format(HtmlWriter writer, StorageItem item) throws IOException {
                ToolPageContext page = (ToolPageContext) writer;

                page.writeElement("img",
                        "height", 100,
                        "src", ImageEditor.Static.getDefault() != null ?
                                new ImageTag.Builder(item).setHeight(100).toUrl() :
                                item.getPublicUrl());
            }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.