Package org.apache.isis.viewer.scimpi.dispatcher.view.field

Examples of org.apache.isis.viewer.scimpi.dispatcher.view.field.LinkedObject


    @Override
    public void process(final Request request, final ObjectAdapter object) {
        final String linkRowView = request.getOptionalProperty(LINK);
        final String linkObjectName = request.getOptionalProperty(ELEMENT_NAME, RequestContext.RESULT);
        final String linkObjectScope = request.getOptionalProperty(SCOPE, Scope.INTERACTION.toString());
        LinkedObject linkedRow = null;
        if (linkRowView != null) {
            linkedRow =
                new LinkedObject(linkObjectName, linkObjectScope, request.getContext().fullUriPath(linkRowView));
        }
        final String bulletType = request.getOptionalProperty("type");
        write(request, object, linkedRow, bulletType);
    }
View Full Code Here


                linkAllView = request.getContext().fullUriPath(linkAllView);
                for (int i = 0; i < linkFields.length; i++) {
                    final boolean isObject = fields.get(i).isOneToOneAssociation();
                    final boolean isNotParseable =
                        !fields.get(i).getSpecification().containsFacet(ParseableFacet.class);
                    linkFields[i] = isObject && isNotParseable ? new LinkedObject(linkAllView) : null;
                }
            }

            if (title == null) {
                title = object.getSpecification().getSingularName();
View Full Code Here

                cls = " class=\"field " + (evenRowClass == null ? EVEN_ROW_CLASS : evenRowClass) + "\"";
            }
            request.appendHtml("<div " + cls + description + "><span class=\"label\">");
            request.appendAsHtmlEncoded(field.getName());
            request.appendHtml(":</span>");
            final LinkedObject linkedObject = linkFields[i];
            addField(request, object, field, linkedObject, showIcons);
            HelpLink.append(request, field.getDescription(), field.getHelp());
            request.appendHtml("</div>");
        }
        request.appendHtml("</div>");
View Full Code Here

    private static TableContentWriter rowBuilder(final Request request, final RequestContext context,
        final String title, final String object, final String fieldName, final List<ObjectAssociation> allFields) {
        final String linkRowView = request.getOptionalProperty(LINK);
        final String linkObjectName = request.getOptionalProperty(ELEMENT_NAME, RequestContext.RESULT);
        final String linkObjectScope = request.getOptionalProperty(SCOPE, Scope.INTERACTION.toString());
        final LinkedObject linkRow =
            linkRowView == null ? null : new LinkedObject(linkObjectName, linkObjectScope,
                context.fullUriPath(linkRowView));
        final boolean includeHeading = request.isRequested(HEADING, true);
        final boolean includeFooting = request.isRequested(FOOTING, false);

        final boolean linkFields = request.isRequested("link-fields", true);
        final boolean showIcons = request.isRequested(SHOW_ICON, true);
        final boolean showSelectOption = request.isRequested(SHOW_SELECT, true);
        final boolean showEditOption = request.isRequested(SHOW_EDIT, true);
        final boolean showDeleteOption = request.isRequested(SHOW_DELETE, true);

        final LinkedFieldsBlock block = new LinkedFieldsBlock();
        request.setBlockContent(block);
        request.processUtilCloseTag();
        final List<ObjectAssociation> fields = block.includedFields(allFields);
        final LinkedObject[] linkedFields = block.linkedFields(fields);
        for (int i = 0; i < linkedFields.length; i++) {
            if (linkedFields[i] == null && linkFields
                && !fields.get(i).getSpecification().containsFacet(ParseableFacet.class)) {
                linkedFields[i] = new LinkedObject("_generic.shtml");
            }
            if (linkedFields[i] != null) {
                linkedFields[i].setForwardView(context.fullUriPath(linkedFields[i].getForwardView()));
            }
        }
View Full Code Here

TOP

Related Classes of org.apache.isis.viewer.scimpi.dispatcher.view.field.LinkedObject

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.