Mercurial > dive4elements > river
changeset 2892:ad013995e410
Fixed creation of initial date string in fixings parameters.
flys-client/trunk@4583 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Tue, 05 Jun 2012 13:18:07 +0000 |
parents | 984a9ad71935 |
children | 6e4e4b96ca6c |
files | flys-client/ChangeLog flys-client/src/main/java/de/intevation/flys/client/client/ui/fixation/FixPeriodPanel.java |
diffstat | 2 files changed, 9 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-client/ChangeLog Mon Jun 04 08:22:06 2012 +0000 +++ b/flys-client/ChangeLog Tue Jun 05 13:18:07 2012 +0000 @@ -1,3 +1,8 @@ +2012-06-05 Raimund Renkert <raimund.renkert@intevation.de> + + * src/main/java/de/intevation/flys/client/client/ui/fixation/FixPeriodPanel.java: + Fixed creation of initial date string. + 2012-06-04 Felix Wolfsteller <felix.wolfsteller@intevation.de> * src/main/webapp/WEB-INF/web.xml: Register Servlet Filter.
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/fixation/FixPeriodPanel.java Mon Jun 04 08:22:06 2012 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/fixation/FixPeriodPanel.java Tue Jun 05 13:18:07 2012 +0000 @@ -3,8 +3,6 @@ import java.util.List; import java.util.ArrayList; import java.util.Date; -import java.text.DateFormat; -import java.text.ParseException; import com.google.gwt.core.client.GWT; import com.google.gwt.i18n.client.DateTimeFormat; @@ -175,14 +173,16 @@ public void success() { List<FixEvent> list = fixInfo.getEvents(); - DateFormat df = DateFormat.getDateInstance(); + DateTimeFormat df = DateTimeFormat.getFormat( + DateTimeFormat.PredefinedFormat.DATE_MEDIUM); + try { Date f = df.parse(list.get(0).getDate()); Date t = df.parse(list.get(list.size() - 1).getDate()); this.inputPanel.setFromDate(f); this.inputPanel.setToDate(t); } - catch(ParseException pe) { + catch(IllegalArgumentException pe) { GWT.log(pe.toString()); } }