fix saving problem for concepts in name editor
authorKatja Luther <k.luther@bgbm.org>
Wed, 16 May 2018 08:35:05 +0000 (10:35 +0200)
committerKatja Luther <k.luther@bgbm.org>
Wed, 16 May 2018 08:35:05 +0000 (10:35 +0200)
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/e4/TaxonEditorInputE4.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/e4/TaxonNameEditorE4.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/e4/container/AbstractGroupedContainerE4.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/reference/ReferenceDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/taxon/TaxonRelationshipDetailElement.java

index d5ac8729e672a7092235e78f6faa7b85fb170fc6..9add106ebb5d0256007cc28d2e597e0ed2e4d8f8 100644 (file)
@@ -357,6 +357,7 @@ public class TaxonEditorInputE4  extends CdmEntitySessionInput implements IConve
         CdmStore.getService(ITaxonService.class).save(toSaveNewConcept);
 
         toSaveNewName.clear();
+        toSaveNewConcept.clear();
 
         CdmStore.getService(ITaxonNodeService.class).merge(taxonNode, true);
 
index 828f810b50117af22634d260c1adb9bb9238d3bb..ba81463569302684f201d206259cd4dab34a93eb 100644 (file)
@@ -73,6 +73,7 @@ import eu.etaxonomy.taxeditor.editor.name.e4.container.AbstractGroupE4;
 import eu.etaxonomy.taxeditor.editor.name.e4.container.AbstractGroupedContainerE4;
 import eu.etaxonomy.taxeditor.editor.name.e4.container.AcceptedGroupE4;
 import eu.etaxonomy.taxeditor.editor.name.e4.container.AcceptedNameContainerE4;
+import eu.etaxonomy.taxeditor.editor.name.e4.container.ConceptContainerE4;
 import eu.etaxonomy.taxeditor.editor.name.e4.container.ContainerFactoryE4;
 import eu.etaxonomy.taxeditor.editor.name.e4.container.HomotypicalSynonymGroupE4;
 import eu.etaxonomy.taxeditor.editor.name.e4.container.MisappliedGroupE4;
@@ -379,7 +380,10 @@ public class TaxonNameEditorE4 implements IConversationEnabled, IDirtyMarkable,
                monitor.subTask(Messages.TaxonNameEditor_SAVING_COMPOSITES
                        + container.getTaxonBase().getTitleCache());
                container.persistName();
-
+               //because of missing cascading the concepts need to be saved separately
+               if (container instanceof ConceptContainerE4){
+                   input.addToSaveNewConcept((Taxon)container.getData());
+               }
                // In case the progress monitor was canceled throw an exception.
                if (monitor.isCanceled()) {
                    throw new OperationCanceledException();
index 7f9d847c61548cbed5975363ffd29fe47a4e2101..cb86be66bdddf105378686e8397570aa9867ebdc 100755 (executable)
@@ -448,6 +448,7 @@ abstract public class AbstractGroupedContainerE4<T extends TaxonBase> implements
                        getTaxonBase().setTitleCache((getTaxonBase().generateTitle()));
                        setDirty(false);
                        getNameViewer().getTextWidget().setEnabled(true);
+
                }
        }
 
index 851717b179d98f1e9028bbe822a7835768e6a117..bd91ccb3a5453db29635ee2d159f96d90ab78215 100644 (file)
@@ -423,7 +423,7 @@ public class ReferenceDetailElement extends AbstractIdentifiableEntityDetailElem
                        getEntity().setType(combo_referenceType.getSelection());
                        updateContent();
                } else if (eventSource == element_timePeriod) {
-                       getEntity().setDatePublished(element_timePeriod.getVerbatimTimePeriod());
+                       getEntity().setDatePublished(element_timePeriod.getTimePeriod());
                        clearException();
                }
                // selections
index ec2f2f3d7cbfb66c32ffcfaecf37898b2e4d66dc..94f0d72ed8878662d0f9068cf81ad5156b7860b7 100644 (file)
@@ -166,7 +166,7 @@ public class TaxonRelationshipDetailElement extends AbstractCdmDetailElement<Tax
 
        @Override
        public void handleEvent(Object eventSource) {
-               if (getEntity().getType().isAnyMisappliedName()){
+               if (getEntity().getType().isAnyMisappliedName() || getEntity().getType().isAnySynonym()){
                         if (eventSource == secReference) {
                                getEntity().setCitation(secReference.getSelection());
                        } else if (eventSource == text_secundum_microreference) {