Revision 849697fa
Added by Andreas Kohlbecker over 5 years ago
src/main/java/eu/etaxonomy/cdm/vaadin/view/registration/RegistrationWorkingsetPresenter.java | ||
---|---|---|
437 | 437 |
getView().getAddNewNameRegistrationButton().setEnabled(false); |
438 | 438 |
if(newNameForRegistrationPopupEditor == null){ |
439 | 439 |
TaxonNamePopupEditor popup = openPopupEditor(TaxonNamePopupEditor.class, event); |
440 |
newNameForRegistrationPopupEditor = popup; |
|
440 | 441 |
popup.setParentEditorActionContext(event.getContext()); |
441 | 442 |
popup.grantToCurrentUser(EnumSet.of(CRUD.UPDATE,CRUD.DELETE)); |
442 | 443 |
popup.withDeleteButton(true); |
... | ... | |
473 | 474 |
TransactionStatus txStatus = getRepo().startTransaction(); |
474 | 475 |
if(newNameForRegistrationPopupEditor != null){ |
475 | 476 |
UUID taxonNameUuid = newNameForRegistrationPopupEditor.getBean().getUuid(); |
476 |
getRepo().getSession().refresh(newNameForRegistrationPopupEditor.getBean().cdmEntity()); |
|
477 |
if(newNameForRegistrationPopupEditor.getBean().cdmEntity().isPersited()){ |
|
478 |
getRepo().getSession().refresh(newNameForRegistrationPopupEditor.getBean().cdmEntity()); |
|
479 |
} |
|
477 | 480 |
Registration reg = getRepo().getRegistrationService().createRegistrationForName(taxonNameUuid); |
478 | 481 |
// reload workingset into current session |
479 | 482 |
loadWorkingSet(workingset.getCitationUuid()); |
Also available in: Unified diff
fixing bug related to creation of new names in RegistrationWorkingsets