Package org.apache.isis.core.metamodel.adapter

Examples of org.apache.isis.core.metamodel.adapter.ObjectAdapter.titleString()


            if (propertyValueAdapter == null) {
                component = new Label(property.getId(), "(null)");
            } else {
                if (propertyValueAdapter.getSpecification().getFacet(ValueFacet.class) == null) {
                    // TODO: make more sophisticated, eg with Links if an object
                    component = new Label(property.getId(), propertyValueAdapter.titleString());
                } else {
                    component = new Label(property.getId(), propertyValueAdapter.titleString());
                }
            }
            propertyValues.add(component);
View Full Code Here


            } else {
                if (propertyValueAdapter.getSpecification().getFacet(ValueFacet.class) == null) {
                    // TODO: make more sophisticated, eg with Links if an object
                    component = new Label(property.getId(), propertyValueAdapter.titleString());
                } else {
                    component = new Label(property.getId(), propertyValueAdapter.titleString());
                }
            }
            propertyValues.add(component);
        }
    }
View Full Code Here

        final String fieldName = request.getOptionalProperty(FIELD);
        final int truncateTo = Integer.valueOf(request.getOptionalProperty(TRUNCATE, "0")).intValue();
        final ObjectAdapter object = request.getContext().getMappedObjectOrResult(id);
        String titleString;
        if (fieldName == null) {
            titleString = object.titleString();
        } else {
            final ObjectAssociation field = object.getSpecification().getAssociation(fieldName);
            if (field.isVisible(IsisContext.getAuthenticationSession(), object).isVetoed()) {
                throw new ForbiddenException(field, ForbiddenException.VISIBLE);
            }
View Full Code Here

            final String link = request.getRequiredProperty(LINK);
            crumbs.add(name, link);
        } else if (action.equals("object")) {
            final String id = request.getOptionalProperty(OBJECT);
            final ObjectAdapter object = MethodsUtils.findObject(request.getContext(), id);
            final String name = object.titleString();
            String link = request.getRequiredProperty(LINK);
            link += "?_result=" + id;
            crumbs.add(name, link);
        } else if (action.equals("return")) {
View Full Code Here

            if (field.isVisible(IsisContext.getAuthenticationSession(), object).isVetoed()) {
                throw new ForbiddenException(field, ForbiddenException.VISIBLE);
            }
            final ObjectAdapter fieldReference = field.get(object);
            if (fieldReference != null) {
                titleString = fieldReference.titleString();
            } else {
                titleString = "";
            }
        }
        request.appendDebug("    " + titleString);
View Full Code Here

    @Override
    protected void copyToClipboard() {
        final TextParseableContent content = (TextParseableContent) getContent();
        final ObjectAdapter object = content.getAdapter();
        if (object != null) {
            final String text = object.titleString();
            getViewManager().setClipboard(text, String.class);
            LOG.debug("copied " + text);
        }
    }
View Full Code Here

            return isEditable;
        }

        final Consent consent = association.isAssociationValid(parentAdapter, null);
        if (consent.isAllowed()) {
            consent.setDescription("Clear the association to this object from '" + parentAdapter.titleString() + "'");
        }
        return consent;
    }

    @Override
View Full Code Here

                }

                if (field.getSpecification().getFacet(ParseableFacet.class) == null) {
                    if (fieldValue != null) {
                        final String iconSegment = showIcon ? "<img class=\"small-icon\" src=\"" + context.imagePath(field.getSpecification()) + "\" alt=\"" + field.getSpecification().getShortIdentifier() + "\"/>" : "";
                        final String entry = iconSegment + fieldValue.titleString();
                        inputField.setHtml(entry);
                    } else {
                        final String entry = "<em>none specified</em>";
                        inputField.setHtml(entry);
                    }
View Full Code Here

            final ObjectAdapter defaultValue = field.getDefault(object);
            if (defaultValue == null) {
                continue;
            }

            final String title = defaultValue.titleString();
            if (field.getSpecification().containsFacet(ParseableFacet.class)) {
                formField.setValue(title);
            } else if (field.isOneToOneAssociation()) {
                final ObjectSpecification objectSpecification = field.getSpecification();
                if (defaultValue != null) {
View Full Code Here

            markDamaged();
        }

        if (!canChangeValue().isAllowed() || click.isShift() || click.button2()) {
            final ObjectAdapter valueAdapter = getContent().getAdapter();
            if (valueAdapter != null && valueAdapter.titleString().length() > 0) {
                final View textView = new BackgroundBorder(Toolkit.getColor(ColorsAndFonts.COLOR_PRIMARY3), new LineBorder(1, Toolkit.getColor(ColorsAndFonts.COLOR_PRIMARY1), new TextView(getContent(), null)));
                getViewManager().setOverlayView(textView);

                final int offset = getView().getPadding().getLeft();
                final Location location = getAbsoluteLocation();
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.