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

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


            new XhtmlTemplate(objectAdapter.titleString() + "." + collectionId, getServletRequest());
        xhtml.appendToBody(asDivIsisSession());
        xhtml.appendToBody(resourcesDiv());

        // title & Oid
        Element div = asDivTableObjectDetails(objectAdapter);
        xhtml.appendToBody(div);

        // collection name & contents
        final OneToManyAssociation collection = (OneToManyAssociation) association;

        div = xhtmlRenderer.div_p(collectionId, HtmlClass.COLLECTION);

        final Element ul = xhtmlRenderer.ul(HtmlClass.COLLECTION);
        div.appendChild(ul);

        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


            new XhtmlTemplate(objectAdapter.titleString() + "." + collectionId, getServletRequest());
        xhtml.appendToBody(asDivIsisSession());
        xhtml.appendToBody(resourcesDiv());

        // title & Oid
        final Element div = asDivTableObjectDetails(objectAdapter);
        xhtml.appendToBody(div);

        // if valid, then set
        if (modification == CollectionModificationType.ADD_TO) {
            collection.addElement(objectAdapter, proposedValueNO);
View Full Code Here

        // html template
        final XhtmlTemplate xhtml = new XhtmlTemplate(nakedObject.titleString() + "." + actionId, getServletRequest());
        xhtml.appendToBody(asDivIsisSession());

        // title & Oid
        Element div = asDivTableObjectDetails(nakedObject);
        xhtml.appendToBody(div);

        // action Name
        div = xhtmlRenderer.div_p(actionId, HtmlClass.COLLECTION);
        xhtml.appendToBody(div);
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;
    }
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;
    }
View Full Code Here

        li.appendChild(toAHref(object));
        return li;
    }

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

    @Override
    public Element doTd(final ObjectAction action) {
        final String oidStrRealTarget = getOidStrRealTarget(action);
        final String uri = MessageFormat.format("{0}/object/{1}", getContextPath(), oidStrRealTarget);
        return new Element(xhtmlRenderer.aHref(uri, oidStrRealTarget, "actionRealTarget", "action", HtmlClass.ACTION));
    }
View Full Code Here

        final String memberName = oneToManyAssociation.getIdentifier().getMemberName();
        final String memberType = "collection";
        final String uri =
            MessageFormat.format("{0}/specs/{1}/{2}/{3}", getContextPath(), getNoSpec().getFullIdentifier(),
                memberType, memberName);
        return new Element(xhtmlRenderer.aHref(uri, oneToManyAssociation.getName(), "propertySpec", memberType,
            HtmlClass.COLLECTION));
    }
View Full Code Here

        final String actionId = nakedObjectAction.getIdentifier().toNameParmsIdentityString();
        final String memberType = "action";
        final String uri =
            MessageFormat.format("{0}/specs/{1}/{2}/{3}", getContextPath(), getNoSpec().getFullIdentifier(),
                memberType, actionId);
        return new Element(xhtmlRenderer.aHref(uri, nakedObjectAction.getName(), "actionSpec", memberType,
            HtmlClass.ACTION));
    }
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.