ref #10552 set internal as default annotation type
authorAndreas Müller <a.mueller@bgbm.org>
Thu, 4 Jul 2024 14:21:52 +0000 (16:21 +0200)
committerAndreas Müller <a.mueller@bgbm.org>
Thu, 4 Jul 2024 14:21:52 +0000 (16:21 +0200)
src/main/java/eu/etaxonomy/cdm/vaadin/component/common/FilterableAnnotationsField.java

index d8ff5834447f11d610e5d54668719d346c874c98..3fecfec7d6c3f9dfc9dbe3935b42491c1603982c 100644 (file)
@@ -120,6 +120,10 @@ public class FilterableAnnotationsField extends CompositeCustomField<List<Annota
                     select.setNullSelectionAllowed(false); //#10538
                     select.setContainerDataSource(typeSelectItemContainer);
                     select.setWidth(100, Unit.PIXELS);
+                    //#10552
+                    //the value is overriden by the row record new value setting of the surrounding table, so no need to set the value here
+//                  select.select(AnnotationType.INTERNAL());  //AnnotationType.TECHNICAL()
+                    select.focus();
                     field = select;
                 }
                 if(field != null) {
@@ -214,7 +218,8 @@ public class FilterableAnnotationsField extends CompositeCustomField<List<Annota
     }
 
     private Annotation newInstance() {
-        return Annotation.NewInstance(null, Language.DEFAULT());
+        //internal according to #10522
+        return Annotation.NewInstance(null, AnnotationType.INTERNAL(), Language.DEFAULT());
     }
 
     @Override