summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArtur Signell <artur.signell@itmill.com>2011-02-28 10:07:11 +0000
committerArtur Signell <artur.signell@itmill.com>2011-02-28 10:07:11 +0000
commit0701a8b41289266e426e1f97e66aa144a562977b (patch)
tree757b6749516377ed063bbe7477f1dd09217f501e
parent1c10bae67c11e541b6a5fa3428d0047cad4cf40a (diff)
downloadvaadin-framework-0701a8b41289266e426e1f97e66aa144a562977b.tar.gz
vaadin-framework-0701a8b41289266e426e1f97e66aa144a562977b.zip
Removed timezone to avoid problems with different JREs
svn changeset:17491/svn branch:6.5
-rw-r--r--tests/src/com/vaadin/tests/components/table/EditableModeChange.java21
1 files changed, 19 insertions, 2 deletions
diff --git a/tests/src/com/vaadin/tests/components/table/EditableModeChange.java b/tests/src/com/vaadin/tests/components/table/EditableModeChange.java
index f3cd53642d..f2163f6df3 100644
--- a/tests/src/com/vaadin/tests/components/table/EditableModeChange.java
+++ b/tests/src/com/vaadin/tests/components/table/EditableModeChange.java
@@ -1,7 +1,9 @@
package com.vaadin.tests.components.table;
+import java.text.DateFormat;
import java.util.Calendar;
import java.util.Date;
+import java.util.Locale;
import com.vaadin.data.Container;
import com.vaadin.event.ItemClickEvent;
@@ -32,12 +34,12 @@ public class EditableModeChange extends TestBase {
Calendar cal = Calendar.getInstance();
cal.set(2010, 7, 12, 12, 7, 54);
- Date date = cal.getTime();
for (String name : names) {
items.addItem(name);
items.getItem(name).getItemProperty("name").setValue(name);
- items.getItem(name).getItemProperty("birthday").setValue(date);
+ items.getItem(name).getItemProperty("birthday")
+ .setValue(new FormattedDate(cal.getTime().getTime()));
}
items.addListener(new ItemClickEvent.ItemClickListener() {
@@ -55,6 +57,21 @@ public class EditableModeChange extends TestBase {
addComponent(items);
}
+ private class FormattedDate extends Date {
+
+ private DateFormat formatter = DateFormat.getDateTimeInstance(
+ DateFormat.MEDIUM, DateFormat.MEDIUM, new Locale("en", "US"));
+
+ public FormattedDate(long time) {
+ super(time);
+ }
+
+ @Override
+ public String toString() {
+ return formatter.format(this);
+ }
+ }
+
private class ItemFieldFactory extends DefaultFieldFactory {
@Override
public Field createField(Container container, Object itemId,