add symbol2 to term details view
authorKatja Luther <k.luther@bgbm.org>
Wed, 28 Nov 2018 11:36:21 +0000 (12:36 +0100)
committerKatja Luther <k.luther@bgbm.org>
Wed, 28 Nov 2018 11:36:21 +0000 (12:36 +0100)
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/DefinedTermDetailElement.java

index 909d259890f9f582ab88529345b693e70ddc3d02..587aec15135549a33252398e9d4771d34d3c187b 100644 (file)
@@ -27,6 +27,8 @@ public class DefinedTermDetailElement<T extends DefinedTermBase> extends Abstrac
 \r
     protected TextWithLabelElement textSymbol;\r
 \r
+    protected TextWithLabelElement textSymbol2;\r
+\r
 \r
        /**\r
         * @param formFactory\r
@@ -42,6 +44,7 @@ public class DefinedTermDetailElement<T extends DefinedTermBase> extends Abstrac
            super.createControls(formElement, entity, style);\r
            textIdInVocabulary = formFactory.createTextWithLabelElement(formElement, "ID in vocabulary", entity.getIdInVocabulary(), style);\r
            textSymbol = formFactory.createTextWithLabelElement(formElement, "Symbol", entity.getSymbol(), style);\r
+           textSymbol2 = formFactory.createTextWithLabelElement(formElement, "Second Symbol", entity.getSymbol2(), style);\r
        };\r
 \r
        /* (non-Javadoc)\r
@@ -66,6 +69,15 @@ public class DefinedTermDetailElement<T extends DefinedTermBase> extends Abstrac
                 getEntity().setSymbol(textSymbol.getText());\r
             }\r
 \r
+        }\r
+\r
+               if(eventSource==textSymbol2){\r
+            if (StringUtils.isBlank(textSymbol2.getText())){\r
+                getEntity().setSymbol2(null);\r
+            }else{\r
+                getEntity().setSymbol2(textSymbol2.getText());\r
+            }\r
+\r
         }\r
        }\r
 \r