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

Examples of org.apache.isis.viewer.xhtml.viewer.tree.Element.appendChild()


            MessageFormat.format("{0}/specs/{1}", getServletRequest().getContextPath(), specFullName);
        ul.appendChild(xhtmlRenderer.li_a(specUri, specFullName, "owning spec", "spec", "facet"));
        final String actionUri =
            MessageFormat.format("{0}/specs/{1}/action/{2}", getServletRequest().getContextPath(), specFullName,
                actionId);
        ul.appendChild(xhtmlRenderer.li_a(actionUri, actionId, "owning action", "collection", "facet"));
        div.appendChild(ul);

        try {
            xhtml.appendToBody(divFacetElements(facetTypeName, action));
        } catch (final IllegalArgumentException e) {
View Full Code Here


    }

    public Element li_a(final String uri, final String aHrefText, final String aHrefRel, final String aHrefRev,
        final String htmlClassAttribute) {
        final Element li = new Element("li");
        li.appendChild(aHref(uri, aHrefText, aHrefRel, aHrefRev, htmlClassAttribute));
        return li;
    }

    public Element li_p(final String paragraphText, final String htmlClassAttribute) {
        final Element li = new Element("li");
View Full Code Here

        return li;
    }

    public Element li_p(final String paragraphText, final String htmlClassAttribute) {
        final Element li = new Element("li");
        li.appendChild(p(paragraphText, htmlClassAttribute));
        return li;
    }

    public Element aHref(final String aHref, final String aHrefText, final String aHrefRel, final String aHrefRev,
        final String htmlClassAttribute) {
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

    }

    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;
    }

    private static <T> Element appendTrTh(final List<TableColumn<T>> columns) {
View Full Code Here

    }

    private static <T> Element appendTrTh(final List<TableColumn<T>> columns) {
        final Element tr = new Element("tr");
        for (final TableColumn<T> column : columns) {
            tr.appendChild(column.th());
        }
        return tr;
    }

    private static <T> void appendTrTd(final Element table, final List<TableColumn<T>> columns, final List<T> rows) {
View Full Code Here

    private static <T> void appendTrTd(final Element table, final List<TableColumn<T>> columns, final List<T> rows) {
        for (final T row : rows) {
            final Element tr = new Element("tr");
            for (final TableColumn<T> column : columns) {
                tr.appendChild(column.td(row));
            }
            table.appendChild(tr);
        }
    }
View Full Code Here

        return dl;
    }

    public DtDd dt_dd(final String dtText, final String ddText, final String htmlClassAttribute) {
        final Element dt = new Element("dt");
        dt.appendChild(dtText);
        final Element dd = new Element("dd");
        dd.appendChild(ddText);
        return new DtDd(dt, dd);
    }
View Full Code Here

    public DtDd dt_dd(final String dtText, final String ddText, final String htmlClassAttribute) {
        final Element dt = new Element("dt");
        dt.appendChild(dtText);
        final Element dd = new Element("dd");
        dd.appendChild(ddText);
        return new DtDd(dt, dd);
    }

    /**
     * Creates a POST form.
View Full Code Here

        final Element div = xhtmlRenderer.div_p("Roles", HtmlClass.SECTION);

        final Element ul = xhtmlRenderer.ul(HtmlClass.ROLES);
        final List<String> roles = getSession().getRoles();
        for (final String role : roles) {
            ul.appendChild(xhtmlRenderer.li_p(role, HtmlClass.ROLE));
        }
        div.appendChild(ul);

        xhtml.appendToBody(div);
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.