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

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


        int selectedIndex = -1;

        for (int i = 0, j = 0; i < objects.length; i++) {
            final ObjectAdapter element = objects[i];
            if (element != null) {
                instances[j] = element.titleString();
                ids[j] = context.mapObject(element);
                if (ids[j].equals(currentEntry)) {
                    selectedIndex = i;
                }
                j++;
View Full Code Here


    private void displayTask(final Context context, final Page page, final Task task) {
        page.setTitle(task.getName());

        final ViewPane content = page.getViewPane();
        final ObjectAdapter targetAdapter = task.getTarget(context);
        String titleString = targetAdapter.titleString();
        if (targetAdapter.isTransient()) {
            titleString += " (Unsaved)";
        }
        content.setTitle(titleString, targetAdapter.getSpecification().getDescription());
        String iconName = targetAdapter.getIconName();
View Full Code Here

        final ObjectAdapter resultAdapter = otoa.get(performContext.getOnAdapter());

        if (resultAdapter != null) {
            String actualStr = performContext.getPeer().getAliasRegistry().getAlias(resultAdapter);
            if (actualStr == null) {
                actualStr = resultAdapter.titleString();
            }
            final CellBinding thatItBinding = performContext.getPeer().getThatItBinding();
            throw ScenarioBoundValueException.current(thatItBinding, actualStr);
        }
View Full Code Here

                return resultAdapter;
            }
            throw ScenarioBoundValueException.current(arg0Binding, "(is null)");
        }

        final String resultTitle = resultAdapter.titleString();

        if (!StringUtils.isNullOrEmpty(expected)) {

            // see if expected matches an alias
            final ObjectAdapter expectedAdapter = performContext.getPeer().getAliasRegistry().getAliased(expected);
View Full Code Here

        if (resultAdapter == null) {
            // ok
            return null;
        }

        final String resultTitle = resultAdapter.titleString();

        if (!StringUtils.isNullOrEmpty(expected)) {

            // see if expected matches an alias
            final ObjectAdapter expectedAdapter = performContext.getPeer().getAliasRegistry().getAliased(expected);
View Full Code Here

            mappedObject.checkVersion(adapter);
        } catch (final ConcurrencyException e) {
            LOG.info("concurrency conflict: " + e.getMessage());
            messages.clear();
            messages.add(e.getMessage());
            messages.add("Reloaded object " + adapter.titleString());
            updateVersion(adapter);
        }
        return adapter;
    }
View Full Code Here

                if (!columnAssociation.isVisible(getAuthenticationSession(), rowAdapter, where).isAllowed()) {
                    table.addEmptyCell();
                } else if (columnSpec.isParseable()) {
                    final MultiLineFacet multiline = columnSpec.getFacet(MultiLineFacet.class);
                    final boolean shouldTruncate = multiline != null && multiline.numberOfLines() > 1;
                    final String titleString = columnAdapter != null ? columnAdapter.titleString() : "";
                    table.addCell(titleString, shouldTruncate);
                } else if (columnAdapter == null) {
                    table.addEmptyCell();
                } else {
                    getPersistenceSession().resolveImmediately(columnAdapter);
View Full Code Here

        final BasicDBObject query = new BasicDBObject();
        for ( ObjectAssociation association  : pattern.getSpecification().getAssociations(Contributed.EXCLUDED)) {
            ObjectAdapter field = association.get(pattern);
            if (!association.isEmpty(pattern)) {
                if (field.isValue()) {
                    query.put(association.getIdentifier().getMemberName(), field.titleString());
                } else if (association.isOneToOneAssociation()) {
                    query.put(association.getIdentifier().getMemberName(), field.getOid());
                }
            }
        }
View Full Code Here

                entryText[i] = "";
            } else if (obj.getSpecification().getFacet(PasswordValueFacet.class) != null) {
                final PasswordValueFacet facet = obj.getSpecification().getFacet(PasswordValueFacet.class);
                entryText[i] = facet.getEditText(obj);
            } else if (obj.getSpecification().isParseable()) {
                entryText[i] = obj.titleString();
            } else if (obj.getSpecification().isNotCollection()) {
                if (readOnly[i]) {
                    entryText[i] = (obj).titleString();
                } else {
                    entryText[i] = context.mapObject(obj);
View Full Code Here

        if (object == null) {
            return;
        }
        String titleString;
        if (fieldName == null) {
            titleString = object.titleString();
        } else {
            final ObjectAssociation field = object.getSpecification().getAssociation(fieldName);
            if (field.isVisible(IsisContext.getAuthenticationSession(), object, Where.ANYWHERE).isVetoed()) {
                throw new ForbiddenException(field, ForbiddenException.VISIBLE);
            }
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.