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

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


        componentFactoryRegistry.addOrReplaceComponent(this, ComponentType.COLLECTION_CONTENTS, entityCollectionModel);
    }

    @Override
    public Integer getCount() {
        final EntityCollectionModel model = getModel();
        return model.getCount();
    }
View Full Code Here


        return appliesIf(model instanceof EntityCollectionModel);
    }

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

        return ApplicationAdvice.APPLIES;
    }

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

            }
        });

        final List<OneToManyAssociation> collectionList = getModel().getTypeOfSpecification().getCollections();
        for (final OneToManyAssociation collection : collectionList) {
            final EntityCollectionModel collectionModel = EntityCollectionModel.createParented(getModel(), collection);
            tabs.add(new AbstractTab(new Model<String>(collection.getName())) {
                private static final long serialVersionUID = 1L;

                @Override
                public Panel getPanel(final String panelId) {
View Full Code Here

                    final ScalarModel scalarModel = entityModel.getPropertyModel(pm);
                    component = getComponentFactoryRegistry().addOrReplaceComponent(container, ID_PROPERTY_OR_COLLECTION, ComponentType.SCALAR_NAME_AND_VALUE, scalarModel);
                } else {
                    final OneToManyAssociation otma = (OneToManyAssociation) association;

                    final EntityCollectionModel entityCollectionModel = EntityCollectionModel.createParented(entityModel, otma);
                    final CollectionPanel collectionPanel = new CollectionPanel(ID_PROPERTY_OR_COLLECTION, entityCollectionModel);
                    container.addOrReplace(collectionPanel);

                    component = getComponentFactoryRegistry().addOrReplaceComponent(container, ID_PROPERTY_OR_COLLECTION, ComponentType.COLLECTION_NAME_AND_CONTENTS, entityCollectionModel);
                }
View Full Code Here

        return appliesIf(model instanceof EntityCollectionModel);
    }

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

        buildGui();
    }

    private void buildGui() {
        final EntityCollectionModel model = getModel();

        final List<IColumn<ObjectAdapter>> columns = Lists.newArrayList();

        addTitleColumn(columns);
        addPropertyColumnsIfRequired(columns);
View Full Code Here

    @Override
    public ApplicationAdvice appliesTo(final IModel<?> model) {
        if (!(model instanceof EntityCollectionModel)) {
            return ApplicationAdvice.DOES_NOT_APPLY;
        }
        final EntityCollectionModel entityCollectionModel = (EntityCollectionModel) model;
        if (entityCollectionModel.hasSelectionHandler()) {
            return ApplicationAdvice.DOES_NOT_APPLY;
        }
        return ApplicationAdvice.APPLIES;
    }
View Full Code Here

        return ApplicationAdvice.APPLIES;
    }

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

        return appliesIf(model instanceof EntityCollectionModel);
    }

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

TOP

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

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.