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

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


    @Override
    public Element doTd(final Facet facet) {
        final String facetTypeCanonicalName = facet.facetType().getCanonicalName();
        final String uri = MessageFormat.format("{0}/facet/{1}", pathPrefix, facetTypeCanonicalName);
        return new Element(xhtmlRenderer.aHref(uri, facetTypeCanonicalName, "facet", "spec", HtmlClass.FACET));
    }
View Full Code Here


        final String specAndAction = specFullName + "/action/" + actionId;
        final XhtmlTemplate xhtml = new XhtmlTemplate(specAndAction, getServletRequest());
        xhtml.appendToBody(asDivIsisSession());

        // owners
        final Element div = xhtmlRenderer.div_p("Owners", null);
        xhtml.appendToBody(div);
        final Element ul = xhtmlRenderer.ul(HtmlClass.SPECIFICATION);

        final String specUri =
            MessageFormat.format("{0}/specs/{1}", getServletRequest().getContextPath(), specFullName);
        ul.appendChild(xhtmlRenderer.li_a(specUri, specFullName, "owning spec", "spec", HtmlClass.SPECIFICATION));

        div.appendChild(ul);

        final ObjectSpecification noSpec = getSpecification(specFullName);
        final ObjectAction action = noSpec.getObjectAction(null, actionId);
View Full Code Here

        final ObjectSpecification noSpec = getSpecification(specFullName);
        final ObjectAssociation property = noSpec.getAssociation(propertyName);

        // owners
        final Element div = xhtmlRenderer.div_p("Owners", null);
        xhtml.appendToBody(div);
        final Element ul = xhtmlRenderer.ul(HtmlClass.PROPERTIES);

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

        final String propertyUri =
            MessageFormat.format("{0}/specs/{1}/property/{2}", getServletRequest().getContextPath(), specFullName,
                propertyName);
        ul.appendChild(xhtmlRenderer.li_a(propertyUri, propertyName, "owning property", "property", "facet"));

        div.appendChild(ul);

        try {
            xhtml.appendToBody(divFacetElements(facetTypeName, property));
View Full Code Here

        final ObjectSpecification noSpec = getSpecification(specFullName);
        final ObjectAssociation collection = noSpec.getAssociation(collectionId);

        // owners
        final Element div = xhtmlRenderer.div_p("Owners", null);
        xhtml.appendToBody(div);
        final Element ul = xhtmlRenderer.ul(HtmlClass.PROPERTIES);

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

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

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

import org.apache.isis.viewer.xhtml.viewer.tree.Element;

public class XhtmlRenderer {

    public Element div_p(final String paragraphText, final String htmlClassAttribute) {
        final Element div = div(htmlClassAttribute);
        div.appendChild(p(paragraphText, htmlClassAttribute));
        return div;
    }
View Full Code Here

        final ObjectSpecification noSpec = getSpecification(specFullName);
        final ObjectAction action = noSpec.getObjectAction(null, actionId);

        // owners
        final Element div = xhtmlRenderer.div_p("Owners", null);
        xhtml.appendToBody(div);
        final Element ul = xhtmlRenderer.ul(HtmlClass.PROPERTIES);
        final String specUri =
            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 div(final String htmlClassAttribute) {
        return builder("div").classAttr(htmlClassAttribute).build();
    }

    public Element ul(final String htmlClassAttribute) {
        final Element ul = new Element("ul");
        addClassAttribute(ul, htmlClassAttribute);
        return ul;
    }
View Full Code Here

        return ul;
    }

    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;
    }
View Full Code Here

        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");
        li.appendChild(p(paragraphText, htmlClassAttribute));
        return li;
    }
View Full Code Here

        return li;
    }

    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

TOP

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

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.