Merge from trunk 10723

This commit is contained in:
Yuriy Artamonov 2013-03-28 14:19:01 +00:00
parent 523f3e5364
commit 6c25132ba4

View File

@ -89,10 +89,13 @@ public class CubaDateFieldWrapper extends CustomField {
@Override
public void setPropertyDataSource(Property newDataSource) {
Object newValue = newDataSource != null ? newDataSource.getValue() : null;
Object oldValue = getValue();
super.setPropertyDataSource(newDataSource);
// support dateField in editable table
if (newDataSource != null && !ObjectUtils.equals(newDataSource.getValue(), getValue()))
dateField.setValue(newDataSource.getValue());
if (newDataSource != null && !ObjectUtils.equals(newValue, oldValue))
dateField.setValue(newValue);
}
@Override
@ -107,4 +110,4 @@ public class CubaDateFieldWrapper extends CustomField {
@Override
public void removeAllValidators() {
}
}
}