changeset 1276:393e5d37d85d

Bugfix: #119 Display min/max values for WQ ranges if input validation failed. flys-client/trunk@2852 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Wed, 28 Sep 2011 10:03:06 +0000
parents ca2d5bcf67a3
children ee55a8ab5f5e
files flys-client/ChangeLog flys-client/src/main/java/de/intevation/flys/client/client/ui/WQInputPanel.java
diffstat 2 files changed, 12 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/flys-client/ChangeLog	Wed Sep 28 09:26:36 2011 +0000
+++ b/flys-client/ChangeLog	Wed Sep 28 10:03:06 2011 +0000
@@ -1,3 +1,10 @@
+2011-09-28  Ingo Weinzierl <ingo@intevation.de>
+
+	flys/issue119 (W-INFO: Wasserspiegellagenberechnung / Dateneingabe ausserhalb des Wertebereichs)
+
+	* src/main/java/de/intevation/flys/client/client/ui/WQInputPanel.java:
+	  Display min/max values when input validation for ranges failed.
+
 2011-09-28  Ingo Weinzierl <ingo@intevation.de>
 
 	flys/issue111 (W-INFO: Wasserspiegellagenberechnung / Strecke)
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/WQInputPanel.java	Wed Sep 28 09:26:36 2011 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/WQInputPanel.java	Wed Sep 28 10:03:06 2011 +0000
@@ -665,6 +665,7 @@
 
         double from = panel.getFrom();
         double to   = panel.getTo();
+        double step = panel.getStep();
 
         if (from < min || from > max) {
             String tmp = MESSAGE.error_validate_lower_range();
@@ -682,6 +683,10 @@
             to = max;
         }
 
+        if (!errors.isEmpty()) {
+            panel.setValues(from, to, step);
+        }
+
         return errors;
     }
 

http://dive4elements.wald.intevation.org