Package org.apache.isis.viewer.wicket.model.models

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


        oidStrByEntityModel.put(entityModel, oidStr);
        list.add(0, entityModel);
    }

    private void removeExisting(final String oidStr) {
        final EntityModel existingModel = entityModelByOidStr.get(oidStr);
        if(existingModel != null) {
            remove(oidStr, existingModel);
        }
    }
View Full Code Here


        oidStrByEntityModel.remove(model);
        list.remove(model);
    }

    public void remove(String oidStr) {
        EntityModel removedModel = entityModelByOidStr.remove(oidStr);
        if(removedModel != null) {
            remove(removedModel);
        }
    }
View Full Code Here

        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

    @Override
    protected ApplicationAdvice appliesTo(final IModel<?> model) {
        if (!(model instanceof EntityModel)) {
            return ApplicationAdvice.DOES_NOT_APPLY;
        }
        final EntityModel entityModel = (EntityModel) model;
        final ObjectAdapter adapter = entityModel.getObject();
        if (adapter == null) {
            // is ok;
        }
        final ObjectSpecification specification = entityModel.getTypeOfSpecification();
        final boolean isObject = specification.isNotCollection();
        final boolean isValue = specification.containsFacet(ValueFacet.class);
        return appliesIf(isObject && !isValue);
    }
View Full Code Here

        super(ComponentType.ENTITY);
    }

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

        super(ComponentType.ENTITY_COLLECTIONS);
    }

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

        super(ComponentType.ENTITY_PROPERTIES);
    }

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

        super(ComponentType.ENTITY, NAME);
    }

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

        buildEntityPropertiesAndOrCollectionsGui();
        setOutputMarkupId(true); // so can repaint via ajax
    }

    private void buildEntityPropertiesAndOrCollectionsGui() {
        final EntityModel model = getModel();
        final ObjectAdapter adapter = model.getObject();
        if (adapter != null) {
            form = new PropCollForm(ID_ENTITY_PROPERTIES_AND_OR_COLLECTIONS, model, render, this);
            addOrReplace(form);
        } else {
            permanentlyHide(ID_ENTITY_PROPERTIES_AND_OR_COLLECTIONS);
View Full Code Here

    @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

TOP

Related Classes of org.apache.isis.viewer.wicket.model.models.EntityModel

Copyright © 2018 www.massapicom. 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.