- added support for editing kindOfUnit in taxeditor for derived units (fixes #3765)
authorPatric Plitzner <p.plitzner@bgbm.org>
Tue, 29 Oct 2013 14:31:32 +0000 (14:31 +0000)
committerPatric Plitzner <p.plitzner@bgbm.org>
Tue, 29 Oct 2013 14:31:32 +0000 (14:31 +0000)
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/FieldObservationDetailElement.java

index 93fed34724182507967f96014180de37efadff74..eef4fdeb2ff5d37bdd8963a1a4c5359fe84f9f76 100644 (file)
@@ -40,10 +40,12 @@ public class FieldObservationDetailElement extends AbstractCdmDetailElement<Deri
 
        private NumberWithLabelElement number_individualCount;
 
-       private TermComboElement<DefinedTerm> combo_sex;
+       private TermComboElement<DefinedTerm> combo_kindOfUnit;
 
        private TermComboElement<DefinedTerm> combo_lifeStage;
 
+       private TermComboElement<DefinedTerm> combo_sex;
+
        /**
         * <p>Constructor for FieldObservationDetailElement.</p>
         *
@@ -66,6 +68,7 @@ public class FieldObservationDetailElement extends AbstractCdmDetailElement<Deri
                text_fieldNotes = formFactory.createTextWithLabelElement(formElement, "Field Notes", entity.getFieldNotes(), style);
 
                number_individualCount = formFactory.createNumberTextWithLabelElement(formElement, "Individual Count", entity.getIndividualCount(), style);
+               combo_kindOfUnit= formFactory.createDefinedTermComboElement(TermType.KindOfUnit, formElement, "Kind Of Unit", entity.getKindOfUnit(), style);
                combo_lifeStage = formFactory.createDefinedTermComboElement(TermType.Stage, formElement, "Life Stage", entity.getLifeStage(), style);
                combo_sex = formFactory.createDefinedTermComboElement(TermType.Sex, formElement, "Sex", entity.getSex(),style);
        }
@@ -88,6 +91,9 @@ public class FieldObservationDetailElement extends AbstractCdmDetailElement<Deri
                else if(eventSource == number_individualCount){
                        getEntity().setIndividualCount(number_individualCount.getInteger());
                }
+               else if(eventSource == combo_kindOfUnit){
+                   getEntity().setKindOfUnit(combo_kindOfUnit.getSelection());
+               }
                else if(eventSource == combo_lifeStage){
                        getEntity().setLifeStage(combo_lifeStage.getSelection());
                }