commit 13d2400790e957a27e16401044b2d812ee4dd2f8
Author: Andreas Kohlbecker <a.kohlbecker@bgbm.org>
Date:   Mon Apr 9 11:32:31 2018 +0200

    ref #7344 updating presenter entity caches with beans modified in popup editors and refreshing teamOrPerson Fields

diff --git a/src/main/java/eu/etaxonomy/cdm/vaadin/view/name/NameTypeDesignationPresenter.java b/src/main/java/eu/etaxonomy/cdm/vaadin/view/name/NameTypeDesignationPresenter.java
index 8f690bc0..e5c024e5 100644
--- a/src/main/java/eu/etaxonomy/cdm/vaadin/view/name/NameTypeDesignationPresenter.java
+++ b/src/main/java/eu/etaxonomy/cdm/vaadin/view/name/NameTypeDesignationPresenter.java
@@ -262,6 +262,7 @@ public class NameTypeDesignationPresenter
 
         if(event.getPopup() == typeNamePopup){
             if(event.getReason() == Reason.SAVE){
+                getCache().load(typeNamePopup.getBean());
                 getView().getTypeNameField().reload();
             }
             if(event.getReason() == Reason.DELETE){
diff --git a/src/main/java/eu/etaxonomy/cdm/vaadin/view/name/TaxonNameEditorPresenter.java b/src/main/java/eu/etaxonomy/cdm/vaadin/view/name/TaxonNameEditorPresenter.java
index e2c3070e..0accd3ab 100644
--- a/src/main/java/eu/etaxonomy/cdm/vaadin/view/name/TaxonNameEditorPresenter.java
+++ b/src/main/java/eu/etaxonomy/cdm/vaadin/view/name/TaxonNameEditorPresenter.java
@@ -332,22 +332,21 @@ public class TaxonNameEditorPresenter extends AbstractCdmEditorPresenter<TaxonNa
         if(event.getPopup() == referenceEditorPopup){
             if(event.getReason() == Reason.SAVE){
 
-                Reference modifiedReference = referenceEditorPopup.getBean();
-
-                // the bean contained in the popup editor is not yet updated at this point.
-                // so re reload it using the uuid since new beans might not have an Id at this point.
-                // modifiedReference = getRepo().getReferenceService().load(modifiedReference.getUuid(), Arrays.asList("inReference"));
+                getCache().load(referenceEditorPopup.getBean());
                 getView().getNomReferenceCombobox().reload(); // refreshSelectedValue(modifiedReference);
-
+                getView().getCombinationAuthorshipField().discard(); //refresh from the datasource
+                getView().updateAuthorshipFields();
             }
 
             referenceEditorPopup = null;
         }
         if(event.getPopup() == basionymNamePopup){
             if(event.getReason() == Reason.SAVE){
-                // TaxonName modifiedTaxonName = basionymNamePopup.getBean();
-                // modifiedTaxonName = getRepo().getNameService().load(modifiedTaxonName.getUuid(), BASIONYM_INIT_STRATEGY);
+
+                getCache().load(basionymNamePopup.getBean());
                 ((ReloadableSelect)basionymSourceField).reload();
+                getView().getBasionymAuthorshipField().discard(); //refresh from the datasource
+                getView().getExBasionymAuthorshipField().discard(); //refresh from the datasource
                 getView().updateAuthorshipFields();
 
             }
diff --git a/src/main/java/eu/etaxonomy/cdm/vaadin/view/occurrence/CollectionEditorPresenter.java b/src/main/java/eu/etaxonomy/cdm/vaadin/view/occurrence/CollectionEditorPresenter.java
index 59822957..40f82f5b 100644
--- a/src/main/java/eu/etaxonomy/cdm/vaadin/view/occurrence/CollectionEditorPresenter.java
+++ b/src/main/java/eu/etaxonomy/cdm/vaadin/view/occurrence/CollectionEditorPresenter.java
@@ -140,10 +140,7 @@ public class CollectionEditorPresenter extends AbstractCdmEditorPresenter<Collec
             if(event.getReason() == Reason.SAVE){
 
                 Collection newCollection = collectionPopuEditor.getBean();
-
-                // TODO the bean contained in the popup editor is not yet updated at this point.
-                //      so re reload it using the uuid since new beans will not have an Id at this point.
-                newCollection = getRepo().getCollectionService().find(newCollection.getUuid());
+                getCache().load(newCollection);
                 getView().getSuperCollectionCombobox().getSelect().setValue(newCollection);
             }
 
diff --git a/src/main/java/eu/etaxonomy/cdm/vaadin/view/reference/ReferenceEditorPresenter.java b/src/main/java/eu/etaxonomy/cdm/vaadin/view/reference/ReferenceEditorPresenter.java
index 82a83fc0..923d0806 100644
--- a/src/main/java/eu/etaxonomy/cdm/vaadin/view/reference/ReferenceEditorPresenter.java
+++ b/src/main/java/eu/etaxonomy/cdm/vaadin/view/reference/ReferenceEditorPresenter.java
@@ -161,11 +161,11 @@ public class ReferenceEditorPresenter extends AbstractCdmEditorPresenter<Referen
    }
 
    @EventBusListenerMethod
-   public void doDoneWithPopupEvent(DoneWithPopupEvent event){
+   public void onDoneWithPopupEvent(DoneWithPopupEvent event){
 
        if(event.getPopup().equals(inReferencePopup)){
            if(event.getReason().equals(Reason.SAVE)){
-               Reference bean = inReferencePopup.getBean();
+               getCache().load(inReferencePopup.getBean());
                getView().getInReferenceCombobox().reload(); //refreshSelectedValue(bean);
            }
            if(event.getReason().equals(Reason.DELETE)){
