changeset 5390:d449b502602b

flys/issue1183: Default from date form fields (fix).
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Mon, 25 Mar 2013 10:16:34 +0100
parents 6ff45b7b834c
children e65fee5ea98a
files flys-client/src/main/java/de/intevation/flys/client/client/ui/GaugeTimeRangePanel.java
diffstat 1 files changed, 3 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/GaugeTimeRangePanel.java	Fri Mar 22 12:33:28 2013 +0100
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/GaugeTimeRangePanel.java	Mon Mar 25 10:16:34 2013 +0100
@@ -124,18 +124,15 @@
     }
 
 
+    /** Put defaults in form. */
     @Override
     protected void initDefaults(DataList dataList) {
         RangeData data = findRangeData(dataList);
 
-        if(data != null) {
-            GWT.log("data: " + data);
+        if (data != null) {
+            dateRange.setFromDate(new Date((Long)data.getLower()));
         }
 
-        // TODO understand why this does get set too late
-        if (getMaxLower() != null)
-            dateRange.setFromDate(new Date((Long)getMaxLower()));
-
         dateRange.setToDate(new Date());
     }
 

http://dive4elements.wald.intevation.org