From 1f4c5f8ee28ba7ce6b5a3c490ff5cf70849f1807 Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Tue, 18 Dec 2012 11:22:28 +0200 Subject: Do not update data model when locale changes (#10562, #8192) Change-Id: I84e00c9e73d69bb398a8e9cc2c6bdb7fa60d3907 --- server/src/com/vaadin/ui/AbstractField.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'server/src/com/vaadin') diff --git a/server/src/com/vaadin/ui/AbstractField.java b/server/src/com/vaadin/ui/AbstractField.java index 9cf72a36b3..4b1476db32 100644 --- a/server/src/com/vaadin/ui/AbstractField.java +++ b/server/src/com/vaadin/ui/AbstractField.java @@ -1348,8 +1348,12 @@ public abstract class AbstractField extends AbstractComponent implements && !isBuffered() && !isModified()) { // When we have a data source and the internal value is directly // read from that we want to update the value - Object modelValue = convertToModel(getInternalValue(), valueLocale); - setValue(convertFromModel(modelValue)); + T newInternalValue = convertFromModel(getPropertyDataSource() + .getValue()); + if (!equals(newInternalValue, getInternalValue())) { + setInternalValue(newInternalValue); + fireValueChange(false); + } } } -- cgit v1.2.3