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

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


    protected void save() {
        final String entry = textContent.getText();

        // do nothing if entry is same as the value object
        final ObjectAdapter value = getValue();
        if (!entry.equals(value == null ? "" : value.titleString())) {
            LOG.debug("field edited: \'" + entry + "\' to replace \'" + (value == null ? "" : value.titleString()) + "\'");

            try {
                parseEntry(entry.toString());
                invalidReason = null;
View Full Code Here


        final String entry = textContent.getText();

        // do nothing if entry is same as the value object
        final ObjectAdapter value = getValue();
        if (!entry.equals(value == null ? "" : value.titleString())) {
            LOG.debug("field edited: \'" + entry + "\' to replace \'" + (value == null ? "" : value.titleString()) + "\'");

            try {
                parseEntry(entry.toString());
                invalidReason = null;
                getViewManager().getSpy().addAction("VALID ENTRY: " + entry);
View Full Code Here

    }

    private String determineTitle() {
        EntityModel model = getModel();
        final ObjectAdapter adapter = model.getObject();
        return adapter != null ? adapter.titleString(getContextAdapterIfAny()) : "(no object)";
    }

    private int abbreviateTo(EntityModel model, String titleString) {
        if(model.getRenderingHint().isInStandaloneTableTitleColumn()) {
            return getSettings().getMaxTitleLengthInStandaloneTables();
View Full Code Here

    public String getObjectAsString() {
        final ObjectAdapter adapter = getObject();
        if (adapter == null) {
            return null;
        }
        return adapter.titleString(null);
    }

    @Override
    public void setObject(final ObjectAdapter adapter) {
        super.setObject(adapter); // associated value
View Full Code Here

    // //////////////////////////////////////
   
    // called by EntityLinkSelect2Panel
    String getInput() {
        final ObjectAdapter pendingElseCurrentAdapter = getModel().getPendingElseCurrentAdapter();
        return pendingElseCurrentAdapter != null? pendingElseCurrentAdapter.titleString(null): "(no object)";
    }

    // //////////////////////////////////////

    // called by EntityLinkSelect2Panel
View Full Code Here

            if (selectedDate != null) {
                date.setTime(selectedDate);
                final Content content = getContent();
                final DateValueFacet facet = content.getSpecification().getFacet(DateValueFacet.class);
                final ObjectAdapter value = facet.createValue(date.getTime());
                ((TextParseableContent) content).parseTextEntry(value.titleString());
                ((TextParseableContent) content).entryComplete();
                getView().refresh();
            }
        }
        getViewManager().clearOverlayView();
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

    private final String text;

    public TextView(final Content content, final ViewSpecification specification) {
        super(content, specification);
        final ObjectAdapter object = content.getAdapter();
        text = object == null ? "" : object.titleString();
    }

    @Override
    public boolean canFocus() {
        return false;
View Full Code Here

    @Override
    protected void setSelection(final OptionContent selectedContent) {
        final ObjectAdapter option = selectedContent.getAdapter();
        final TextParseableContent content = (TextParseableContent) getContent();
        content.parseTextEntry(option.titleString());
        content.entryComplete();
    }
}
View Full Code Here

    }

    @Override
    public void init(final ObjectAdapter element) {
        final ObjectAdapter refTo = field.get(element);
        title = refTo == null ? null : refTo.titleString();
        title = title == null ? "" : title;
    }

    @Override
    public int compare(final ObjectAdapter sortedElement) {
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.