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

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


            return xhtmlRenderer.p(null, getHtmlClassAttribute());
        }

        final Element div = xhtmlRenderer.div(getHtmlClassAttribute());

        div.appendChild(form(association));
        return div;
    }

    private Element form(final T association) {
        final String associationId = association.getId();
View Full Code Here


            MessageFormat.format("{0}/object/{1}/action/{2}", resourceContext.getHttpServletRequest().getContextPath(),
                getOidStrRealTarget(action), actionId);
        final List<ObjectActionParameter> parameters = action.getParameters();

        final Element div = xhtmlRenderer.div(HtmlClass.ACTION);
        div.appendChild(renderForm(formName, uri, parameters));
        return div;
    }

    private Element renderForm(final String formName, final String uri, final List<ObjectActionParameter> parameters) {
View Full Code Here

        for (int i = 0; i < parameters.size(); i++) {
            final ObjectActionParameter parameter = parameters.get(i);
            final String inputFieldName = INPUT_FIELD_NAME_PREFIX + i;

            final Element inputLabel = new Element("p");
            inputLabel.appendChild(parameter.getName());
            form.appendChild(inputLabel);

            final Element inputValue = new Element("input");
            inputValue.addAttribute(new Attribute("type", "value"));
            inputValue.addAttribute(new Attribute("name", inputFieldName));
View Full Code Here

        final ObjectAdapter collectionObj = collection.get(objectAdapter);

        final CollectionFacet facet = CollectionFacetUtils.getCollectionFacetFromSpec(collectionObj);
        for (final Iterator<ObjectAdapter> iter = facet.iterator(collectionObj); iter.hasNext();) {
            final ObjectAdapter associatedNO = iter.next();
            ul.appendChild(toLiAHref(associatedNO));
        }

        xhtml.appendToBody(div);
        return xhtml.toXML();
    }
View Full Code Here

        return null;
    }

    private Element actionResult(final Object result) {
        final Element div_p = xhtmlRenderer.div_p("Action Results", HtmlClass.ACTION_RESULT);
        div_p.appendChild(actionResultContent(result));
        return div_p;
    }

    private Element actionResultContent(final Object result) {
        if (result == null) {
View Full Code Here

        // deal with as collection
        if (result instanceof Collection<?>) {
            final Collection<?> collection = (Collection<?>) result;
            final Element ul = xhtmlRenderer.ul(HtmlClass.ACTION_RESULT);
            for (final Object object : collection) {
                ul.appendChild(toLiAHref(object));
            }
            return ul;
        }

        // deal with as object
View Full Code Here

    // Helpers
    // //////////////////////////////////////////////////////////////

    private Element toLiAHref(final Object object) {
        final Element li = new Element("li");
        li.appendChild(toAHref(object));
        return li;
    }

    private Element toLiAHref(final ObjectAdapter nakedObject) {
        final Element li = new Element("li");
View Full Code Here

        return li;
    }

    private Element toLiAHref(final ObjectAdapter nakedObject) {
        final Element li = new Element("li");
        li.appendChild(toAHref(nakedObject));
        return li;
    }

    private Element toAHref(final Object object) {
        final ObjectAdapter nakedObject = getAdapterManager().getAdapterFor(object);
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.