Package org.apache.isis.viewer.xhtml.viewer.tree

Examples of org.apache.isis.viewer.xhtml.viewer.tree.Attribute


        final ObjectSpecification noSpec = nakedObject.getSpecification();
        final String oidStr = getOidStr(nakedObject);

        final Element div = new Element("div");
        div.addAttribute(new Attribute("class", HtmlClass.OBJECT_SPECS));
        final Element table = new Element("table");
        table.addAttribute(new Attribute("border", "1"));
        div.appendChild(table);

        Element value;

        value = xhtmlRenderer.p(nakedObject.titleString(), null);
View Full Code Here


        td.appendChild(key);
        tr.appendChild(td);

        td = new Element("td");
        td.appendChild(value);
        td.addAttribute(new Attribute("class", htmlClassAttribute));
        tr.appendChild(td);
    }
View Full Code Here

        return this;
    }

    public ElementBuilder attr(final String name, final String value) {
        assertInitialized();
        element.addAttribute(new Attribute(name, value));
        return this;
    }
View Full Code Here

        return this;
    }

    public ElementBuilder classAttr(final String htmlClassAttribute) {
        if (htmlClassAttribute != null) {
            element.addAttribute(new Attribute("class", htmlClassAttribute));
        }
        return this;
    }
View Full Code Here

        return this;
    }

    public ElementBuilder idAttr(final String idAttribute) {
        if (idAttribute != null) {
            element.addAttribute(new Attribute("id", idAttribute));
        }
        return this;
    }
View Full Code Here

    private XhtmlTemplate(final String titleStr, final ServletContext servletContext, final String... javaScriptFiles) {
        this.html = new Element("html");
        addHeadAndTitle(titleStr);
        for (final String javaScriptFile : javaScriptFiles) {
            final Element script = new Element("script");
            script.addAttribute(new Attribute("type", "text/javascript"));
            script.addAttribute(new Attribute("src", "/" + javaScriptFile));
            script.appendChild(""); // force the </script> to be separate.
            head.appendChild(script);
        }
        addBody();
    }
View Full Code Here

     * The <tt>id</tt> attribute is so that Javascript can use <tt>document.getElementById(&quot;body&quot;);</tt>
     *
     */
    private void addBody() {
        body = new Element("body");
        body.addAttribute(new Attribute("id", "body"));
        html.appendChild(body);
    }
View Full Code Here

    public Element aHref(final String aHref, final String aHrefText, final String aHrefRel, final String aHrefRev,
        final String htmlClassAttribute) {
        final Element a = new Element("a");
        a.appendChild(aHrefText);
        a.addAttribute(new Attribute("href", aHref));
        a.addAttribute(new Attribute("rel", aHrefRel));
        a.addAttribute(new Attribute("rev", aHrefRev));
        addClassAttribute(a, htmlClassAttribute);
        return a;
    }
View Full Code Here

        return a;
    }

    public <T> Element table(final List<TableColumn<T>> columns, final List<T> rows, final String htmlClassAttribute) {
        final Element table = new Element("table");
        table.addAttribute(new Attribute("border", "1"));
        table.appendChild(appendTrTh(columns));
        appendTrTd(table, columns, rows);
        return table;
    }
View Full Code Here

    private static void addClassAttribute(final Element el, final String htmlClassAttribute) {
        if (htmlClassAttribute == null) {
            return;
        }
        el.addAttribute(new Attribute("class", htmlClassAttribute));
    }
View Full Code Here

TOP

Related Classes of org.apache.isis.viewer.xhtml.viewer.tree.Attribute

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.