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

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


            buffer.append("<input type=\"radio\" name=\"" + field + "\" value=\"null\"></input><br/>\n");
        }
        while (iterator.hasNext()) {
            final ObjectAdapter element = iterator.next();
            final String elementId = context.mapObject(element, Scope.INTERACTION);
            final String title = element.titleString();
            final String checked = element == selectedItem ? "checked=\"checked\"" : "";
            buffer.append("<input type=\"radio\" name=\"" + field + "\" value=\"" + elementId + "\"" + checked + ">" + title + "</input><br/>\n");
        }

        return buffer.toString();
View Full Code Here


            buffer.append("  <option value=\"null\"></option>\n");
        }
        while (iterator.hasNext()) {
            final ObjectAdapter element = iterator.next();
            final String elementId = context.mapObject(element, Scope.INTERACTION);
            final String title = element.titleString();
            final String checked = element == selectedItem ? "selected=\"selected\"" : "";
            buffer.append("  <option value=\"" + elementId + "\"" + checked + ">" + title + "</option>\n");
        }
        buffer.append("</select>\n");
        return buffer.toString();
View Full Code Here

            IsisContext.getPersistenceSession().resolveImmediately(object);
            if (isIconShowing) {
                final String iconPath = request.getContext().imagePath(object);
                request.appendHtml("<img class=\"" + className + "\" src=\"" + iconPath + "\" />");
            }
            request.appendTruncated(object.titleString(), truncateTo);
            request.appendHtml("</span>");
        }
        request.closeEmpty();
    }
View Full Code Here

            }
            request.pushNewBuffer();
            request.processUtilCloseTag();
            final String buffer = request.popBuffer();
            if (buffer.trim().length() == 0) {
                request.appendAsHtmlEncoded(fieldReference == null ? "" : fieldReference.titleString());
            } else {
                request.appendHtml(buffer);
            }
            if (linkView != null) {
                request.appendHtml("</a>");
View Full Code Here

        final String idString = request.getObjectId();
        final ObjectAdapter collection = context.getMappedCollection(idString);
        if (collection == null) {
            throw new ActionException("No such collection: " + idString);
        }
        final String titleString = collection.titleString();

        page.setTitle(titleString);

        final TypeOfFacet facet = collection.getSpecification().getFacet(TypeOfFacet.class);
        final ObjectSpecification elementSpecification = facet.valueSpec();
View Full Code Here

            throw new ActionException("No such object: " + idString);
        }

        getPersistenceSession().resolveImmediately(adapter);

        page.setTitle(adapter.titleString());

        final ViewPane content = page.getViewPane();
        content.setWarningsAndMessages(context.getMessages(), context.getWarnings());
        content.setTitle(adapter.titleString(), adapter.getSpecification().getDescription());
        content.setIconName(adapter.getIconName());
View Full Code Here

        page.setTitle(adapter.titleString());

        final ViewPane content = page.getViewPane();
        content.setWarningsAndMessages(context.getMessages(), context.getWarnings());
        content.setTitle(adapter.titleString(), adapter.getSpecification().getDescription());
        content.setIconName(adapter.getIconName());

        if (addObjectToHistory()) {
            context.addObjectToHistory(idString);
        }
View Full Code Here

            final String newEntry = field.getEntry();
            final ObjectAdapter originalValue = fields.get(i).get(object);
            final boolean isVisible = fields.get(i).isVisible(IsisContext.getAuthenticationSession(), object, where).isAllowed();
            final boolean isUsable = fields.get(i).isUsable(IsisContext.getAuthenticationSession(), object, where).isAllowed();
            final boolean bothEmpty = originalValue == null && newEntry.equals("");
            final boolean bothSame = newEntry.equals(originalValue == null ? "" : originalValue.titleString());
            if ((!isVisible || !isUsable) || bothEmpty || bothSame) {
                if (fields.get(i).getSpecification().getFacet(ParseableFacet.class) == null) {
                    // REVIEW restores object to loader
                    context.getMappedObject(newEntry);
                }
View Full Code Here

        if (value == null || isEmpty(view)) {
            // TODO: move logic into Facets.
            return new Veto("Field is already empty");
        }
        // TODO: move logic into Facets.
        return consent.setDescription(String.format("Clear value ", value.titleString()));
    }

    @Override
    public void execute(final Workspace frame, final View view, final Location at) {
        field.clear();
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.