fixing #5319
authorKatja Luther <k.luther@bgbm.org>
Tue, 10 Nov 2015 09:26:10 +0000 (10:26 +0100)
committerKatja Luther <k.luther@bgbm.org>
Tue, 10 Nov 2015 09:26:10 +0000 (10:26 +0100)
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/NumberWithLabelElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/PartialElement.java

index 72cc267f39235518d477ffa8715b0502f82a9744..26e410dfb1973709d98a21f6a2265984223ac6de 100644 (file)
@@ -64,7 +64,7 @@ public class NumberWithLabelElement extends TextWithLabelElement {
            if(super.getText()!=null){
                String text = super.getText().trim();
                try {
            if(super.getText()!=null){
                String text = super.getText().trim();
                try {
-                   return StringUtils.isBlank(text) ? 0 : new Integer(text);
+                   return StringUtils.isBlank(text) ? null : new Integer(text);
                } catch (NumberFormatException e) {
                    exception = e;
                }
                } catch (NumberFormatException e) {
                    exception = e;
                }
index 8149f3aad97c705becace2e52791c88f5976f531..54c595239076d627ab43ea38e11052c207b7116b 100644 (file)
@@ -119,8 +119,10 @@ public class PartialElement extends AbstractCdmFormElement implements ISelectabl
        private void handleEvent(Object eventSource){
                if(eventSource == number_month){
                        partial = TimePeriod.setPartialField(partial, number_month.getInteger(), TimePeriod.MONTH_TYPE);
        private void handleEvent(Object eventSource){
                if(eventSource == number_month){
                        partial = TimePeriod.setPartialField(partial, number_month.getInteger(), TimePeriod.MONTH_TYPE);
+                       
                }else if(eventSource == number_day){
                        partial = TimePeriod.setPartialField(partial, number_day.getInteger(), TimePeriod.DAY_TYPE);
                }else if(eventSource == number_day){
                        partial = TimePeriod.setPartialField(partial, number_day.getInteger(), TimePeriod.DAY_TYPE);
+                       
                }else if(eventSource == number_year){
                        partial = TimePeriod.setPartialField(partial, number_year.getInteger(), TimePeriod.YEAR_TYPE);
                }
                }else if(eventSource == number_year){
                        partial = TimePeriod.setPartialField(partial, number_year.getInteger(), TimePeriod.YEAR_TYPE);
                }