changeset 590:81d7939a5d9e

DoubleArrayPanel takes care on empty array fields when adding new double values. This avoids displaying 'null' values. flys-client/trunk@2185 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Tue, 21 Jun 2011 16:54:17 +0000
parents 942bd0e7e332
children 62b65b7b5c7c
files flys-client/ChangeLog flys-client/src/main/java/de/intevation/flys/client/client/ui/DoubleArrayPanel.java
diffstat 2 files changed, 11 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/flys-client/ChangeLog	Tue Jun 21 16:43:59 2011 +0000
+++ b/flys-client/ChangeLog	Tue Jun 21 16:54:17 2011 +0000
@@ -1,3 +1,8 @@
+2011-06-21  Ingo Weinzierl <ingo@intevation.de>
+
+	* src/main/java/de/intevation/flys/client/client/ui/DoubleArrayPanel.java:
+	  Take care on empty fields when adding a new double value.
+
 2011-06-21	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
 
 	* src/main/java/de/intevation/flys/client/shared/model/ReportMode.java:
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/DoubleArrayPanel.java	Tue Jun 21 16:43:59 2011 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/DoubleArrayPanel.java	Tue Jun 21 16:54:17 2011 +0000
@@ -129,7 +129,12 @@
 
         String current = ti.getValueAsString();
 
-        current += " " + f.format(value);
+        if (current == null || current.length() == 0) {
+            current = f.format(value);
+        }
+        else {
+            current += " " + f.format(value);
+        }
 
         ti.setValue(current);
     }

http://dive4elements.wald.intevation.org