@Override
public Reference createNewBean() {
Reference newRef = ReferenceFactory.newSection();
- newRef.setInReference(getPublishedUnit().getCitation());
+ Reference reference = getRepo().getReferenceService().load(
+ getPublishedUnit().getCitation().getUuid(),
+ ReferenceEllypsisFormatter.INIT_STRATEGY
+ );
+ newRef.setInReference(reference);
return newRef;
}
};
referenceEditorPopup.grantToCurrentUser(EnumSet.of(CRUD.UPDATE, CRUD.DELETE));
referenceEditorPopup.withDeleteButton(true);
- configureReferencePopupEditor(referenceEditorPopup, null);
+ RegistrationUiReferenceEditorFormConfigurator
+ .create(newReferenceInstantiator != null)
+ .configure(referenceEditorPopup, newReferenceInstantiator);
+ referenceEditorPopup.loadInEditor(null);
}
@EventBusListenerMethod(filter = EditorActionTypeFilter.Edit.class)
ReferencePopupEditor referenceEditorPopup = openPopupEditor(ReferencePopupEditor.class, event);
referenceEditorPopup.withDeleteButton(true);
- configureReferencePopupEditor(referenceEditorPopup, event.getEntityUuid());
+ // TODO this should be configurable per UI -
+ // RegistrationUiReferenceEditorFormConfigurator as spring bean,
+ // different spring profiles
+ // see also similar methods in TaxonName and SpecimenTypeDesigationEditors
+ RegistrationUiReferenceEditorFormConfigurator
+ .create(newReferenceInstantiator != null)
+ .configure(referenceEditorPopup, newReferenceInstantiator);
+ referenceEditorPopup.loadInEditor(event.getEntityUuid());
}
@EventBusListenerMethod
this.publishedUnit = publishedUnit;
}
- /**
- * @param referenceEditorPopup
- */
- private void configureReferencePopupEditor(ReferencePopupEditor referenceEditorPopup, UUID referenceUUID) {
-
- // TODO this should be configurable per UI -
- // RegistrationUiReferenceEditorFormConfigurator as spring bean,
- // different spring profiles
- // see also similar methods in TaxonName and SpecimenTypeDesigationEditors
- RegistrationUiReferenceEditorFormConfigurator
- .create(newReferenceInstantiator != null)
- .configure(referenceEditorPopup, newReferenceInstantiator);
-
- referenceEditorPopup.loadInEditor(referenceUUID);
- // TODO limit ??? referenceEditorPopup.getTypeSelect().setValue(ReferenceType.Article);
- }
-
}