From: Patrick Plitzner
Date: Mon, 4 Apr 2016 04:28:27 +0000 (+0200)
Subject: Info message when trying to open non-persisted IndividualsAssociations
X-Git-Tag: 4.0.0^2~47
X-Git-Url: https://dev.e-taxonomy.eu/gitweb/taxeditor.git/commitdiff_plain/c9d5e23fa025c72642b0146740135a3ef5f59c15
Info message when trying to open non-persisted IndividualsAssociations
---
diff --git a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/handler/OpenDerivativeEditorForDescriptionElement.java b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/handler/OpenDerivativeEditorForDescriptionElement.java
index 698d7938b..1d1dbde7b 100644
--- a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/handler/OpenDerivativeEditorForDescriptionElement.java
+++ b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/handler/OpenDerivativeEditorForDescriptionElement.java
@@ -30,6 +30,10 @@ public class OpenDerivativeEditorForDescriptionElement extends DefaultOpenHandle
@Override
protected void open(ExecutionEvent event, IndividualsAssociation entity) {
+ if(entity==null || entity.getAssociatedSpecimenOrObservation()==null){
+ MessagingUtils.messageDialog("No specimens found", this, "No specimens found for the selected object. (Maybe there are unsaved changes)");
+ return;
+ }
SpecimenOrObservationBase associatedSpecimenOrObservation = entity.getAssociatedSpecimenOrObservation();
if(associatedSpecimenOrObservation!=null){
UUID specimenUuid = associatedSpecimenOrObservation.getUuid();