Examples of EntityModel


Examples of org.apache.isis.viewer.wicket.model.models.EntityModel

        EntityCollectionModel collectionModel = EntityCollectionModel.createParented(entityModel, otma);
        return collectionModel;
    }

    CollectionPanel(String id, EntityCollectionModel collectionModel) {
        this(id, collectionModel, new EntityModel(collectionModel.getParentObjectAdapterMemento()), collectionModel.getCollectionMemento().getCollection());
    }
View Full Code Here

Examples of org.apache.isis.viewer.wicket.model.models.EntityModel

        ObjectAdapter targetAdapter = null;
        try {
            targetAdapter = getActionModel().getTargetAdapter();
           
            getComponentFactoryRegistry().addOrReplaceComponent(this, ComponentType.PARAMETERS, getActionModel());
            getComponentFactoryRegistry().addOrReplaceComponent(header, ComponentType.ENTITY_ICON_AND_TITLE, new EntityModel(targetAdapter));

            final String actionName = getActionModel().getActionMemento().getAction().getName();
            header.add(new Label(ID_ACTION_NAME, Model.of(actionName)));
           
        } catch (final ConcurrencyException ex) {
View Full Code Here

Examples of org.apache.isis.viewer.wicket.model.models.EntityModel

        addOrReplace(component);
    }


    private void buildEntityActionsGui() {
        final EntityModel model = getModel();
        final ObjectAdapter adapter = model.getObject();
        final ObjectAdapterMemento adapterMemento = model.getObjectAdapterMemento();
        if (adapter != null) {
            final List<ObjectAction> topLevelActions = getTopLevelActions(adapter);

            if(!topLevelActions.isEmpty()) {
                final ActionPromptProvider actionPromptProvider = ActionPromptProvider.Util.getFrom(this);
View Full Code Here

Examples of org.apache.isis.viewer.wicket.model.models.EntityModel

        addOrReplaceLinkWrapper();
        setOutputMarkupId(true);
    }

    private void addOrReplaceLinkWrapper() {
        EntityModel entityModel = getModel();
        final WebMarkupContainer entityLinkWrapper = addOrReplaceLinkWrapper(entityModel);
        addOrReplace(entityLinkWrapper);
    }
View Full Code Here

Examples of org.apache.isis.viewer.wicket.model.models.EntityModel

        int maxTitleLength = abbreviateTo(getModel(), titleString);
        return abbreviated(titleString, maxTitleLength);
    }

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

Examples of org.apache.isis.viewer.wicket.model.models.EntityModel

        };
        return image;
    }

    public ObjectAdapter getContextAdapterIfAny() {
        EntityModel model = getModel();
        ObjectAdapterMemento contextAdapterMementoIfAny = model.getContextAdapterIfAny();
        return contextAdapterMementoIfAny != null? contextAdapterMementoIfAny.getObjectAdapter(ConcurrencyChecking.NO_CHECK): null;
    }
View Full Code Here

Examples of org.apache.isis.viewer.wicket.model.models.EntityModel

        super(ComponentType.ENTITY, EntityLinksSelectorPanel.class);
    }

    @Override
    public Component createComponent(final String id, final IModel<?> model) {
        final EntityModel entityModel = (EntityModel) model;
        return new EntityLinksSelectorPanel(id, entityModel, this);
    }
View Full Code Here

Examples of org.apache.isis.viewer.wicket.model.models.EntityModel

    @Override
    public ApplicationAdvice appliesTo(final IModel<?> model) {
        if (!(model instanceof EntityModel)) {
            return ApplicationAdvice.DOES_NOT_APPLY;
        }
        final EntityModel entityModel = (EntityModel) model;
        final ObjectSpecification specification = entityModel.getTypeOfSpecification();
        return appliesIf(specification != null && !specification.containsFacet(ValueFacet.class));
    }
View Full Code Here

Examples of org.apache.isis.viewer.wicket.model.models.EntityModel

        return appliesIf(specification != null && !specification.containsFacet(ValueFacet.class));
    }

    @Override
    public Component createComponent(final String id, final IModel<?> model) {
        final EntityModel scalarModel = (EntityModel) model;
        return new EntityLinkSimplePanel(id, scalarModel);
    }
View Full Code Here

Examples of org.apache.isis.viewer.wicket.model.models.EntityModel

    private void syncWithInput() {
        final ObjectAdapter adapter = getPendingElseCurrentAdapter();

        if (adapter != null) {
            final EntityModel entityModelForLink = new EntityModel(adapter);
            entityModelForLink.setContextAdapterIfAny(getEntityModel().getContextAdapterIfAny());
            entityModelForLink.setRenderingHint(getEntityModel().getRenderingHint());
           
            final ComponentFactory componentFactory = getComponentFactoryRegistry().findComponentFactory(ComponentType.ENTITY_ICON_AND_TITLE, entityModelForLink);
            //final ComponentFactory componentFactory = getComponentFactoryRegistry().findComponentFactory(ComponentType.ENTITY_ICON_TITLE_AND_COPYLINK, entityModelForLink);
            final Component component = componentFactory.createComponent(entityModelForLink);
            addOrReplace(component);
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.