- set sample designation to null when text is empty
authorPatric Plitzner <p.plitzner@bgbm.org>
Mon, 15 Dec 2014 13:44:31 +0000 (13:44 +0000)
committerPatric Plitzner <p.plitzner@bgbm.org>
Mon, 15 Dec 2014 13:44:31 +0000 (13:44 +0000)
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/dna/SampleDesignationTextDetailElement.java

index ef54fb2daf9bdde72fd0b045ce9b015bb14f65a9..90d754c8864e3890ce601bc5b51eb17b2eb20de6 100644 (file)
@@ -65,7 +65,11 @@ public class SampleDesignationTextDetailElement extends
     @Override
     public void handleEvent(Object eventSource) {
         if(eventSource==text_description){
-            this.entity.setIdentifier(text_description.getText());
+            String identifier = null;
+            if(!text_description.getText().isEmpty()){
+                identifier = text_description.getText();
+            }
+            this.entity.setIdentifier(identifier);
         }
     }