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);
}
}