Merge branch 'release/5.28.0'
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / ui / section / vocabulary / StatisticalMeasureCollectionElement.java
index 69b0f3b441b43add29baee83c6b0460a498099d4..829993ece96d7f68f01a01c58b3a5bdaff4ac978 100644 (file)
@@ -48,12 +48,15 @@ public class StatisticalMeasureCollectionElement extends AbstractEntityCollectio
     @Override
     public void createControls(ICdmFormElement element, int style) {
         comboStatisticalMeasure = formFactory.createDefinedTermComboElementDto(TermType.StatisticalMeasure, element, "Statistical measure", null, style);
+        if (entity != null){
+               setEntity(entity);
+        }
     }
 
     @Override
     public void setEntity(StatisticalMeasure entity) {
         this.entity = entity;
-        if(entity.getId()!=0){
+        if(entity.getId()!=0 && comboStatisticalMeasure != null){
             comboStatisticalMeasure.setSelection(entity);
             comboStatisticalMeasure.removeEmptyElement();
         }