From d72bca45160522468862e91f914758a3d68330dc Mon Sep 17 00:00:00 2001 From: peter Date: Tue, 28 May 2013 22:19:05 +0200 Subject: [PATCH] reflect changed dateformat on server --- hsarweb/src/de/hsadmin/web/DateProperty.java | 3 ++- .../src/de/hsadmin/web/vaadin/DatePropertyFieldFactory.java | 3 ++- hsarweb/src/de/hsadmin/web/vaadin/TableComponentFactory.java | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/hsarweb/src/de/hsadmin/web/DateProperty.java b/hsarweb/src/de/hsadmin/web/DateProperty.java index 613da8b..826197d 100644 --- a/hsarweb/src/de/hsadmin/web/DateProperty.java +++ b/hsarweb/src/de/hsadmin/web/DateProperty.java @@ -3,10 +3,11 @@ package de.hsadmin.web; import java.text.DateFormat; import java.text.ParseException; import java.util.Date; +import java.util.Locale; public class DateProperty extends AbstractProperty { - public static final DateFormat serverDf = DateFormat.getDateInstance(DateFormat.SHORT); + public static final DateFormat serverDf = DateFormat.getDateInstance(DateFormat.SHORT, Locale.GERMAN); final private Date property; diff --git a/hsarweb/src/de/hsadmin/web/vaadin/DatePropertyFieldFactory.java b/hsarweb/src/de/hsadmin/web/vaadin/DatePropertyFieldFactory.java index 5fff817..2f5b908 100644 --- a/hsarweb/src/de/hsadmin/web/vaadin/DatePropertyFieldFactory.java +++ b/hsarweb/src/de/hsadmin/web/vaadin/DatePropertyFieldFactory.java @@ -3,6 +3,7 @@ package de.hsadmin.web.vaadin; import java.text.DateFormat; import java.text.ParseException; import java.util.Date; +import java.util.Locale; import com.vaadin.data.Property.ConversionException; import com.vaadin.data.Property.ReadOnlyException; @@ -19,7 +20,7 @@ import de.hsadmin.web.config.PropertyFieldFactory; public class DatePropertyFieldFactory implements PropertyFieldFactory { - public static final DateFormat serverDf = DateFormat.getDateInstance(DateFormat.SHORT); + public static final DateFormat serverDf = DateFormat.getDateInstance(DateFormat.SHORT, Locale.GERMAN); private boolean readOnly = false; private boolean writeOnce = false; diff --git a/hsarweb/src/de/hsadmin/web/vaadin/TableComponentFactory.java b/hsarweb/src/de/hsadmin/web/vaadin/TableComponentFactory.java index 363e32f..58a7e85 100644 --- a/hsarweb/src/de/hsadmin/web/vaadin/TableComponentFactory.java +++ b/hsarweb/src/de/hsadmin/web/vaadin/TableComponentFactory.java @@ -7,6 +7,7 @@ import java.util.Calendar; import java.util.Date; import java.util.HashMap; import java.util.List; +import java.util.Locale; import java.util.Map; import com.vaadin.data.Property; @@ -37,7 +38,7 @@ import de.hsadmin.web.config.PropertyTableColumn; public class TableComponentFactory implements ComponentFactory, Serializable { private static final long serialVersionUID = 1L; - private static final DateFormat serverDateFormat = DateFormat.getDateInstance(DateFormat.SHORT); + private static final DateFormat serverDateFormat = DateFormat.getDateInstance(DateFormat.SHORT, Locale.GERMAN); private Module module; private Table table;