Generic filter component bugfix #PL-4488

This commit is contained in:
Maxim Gorbunkov 2015-01-27 12:23:03 +00:00
parent 7e9487ca6b
commit 9629ead3f3

View File

@ -138,14 +138,18 @@ public class Param {
}
public void setValue(Object value) {
setValue(value, true);
}
protected void setValue(Object value, boolean updateEditComponent) {
if (!ObjectUtils.equals(value, this.value)) {
Object prevValue = this.value;
this.value = value;
for (ValueListener listener : listeners) {
listener.valueChanged(this, "value", prevValue, value);
}
if (this.editComponent instanceof Component.HasValue) {
((Component.HasValue) editComponent).setValue(value == null ? null : formatValue(value));
if ( updateEditComponent && this.editComponent instanceof Component.HasValue) {
((Component.HasValue) editComponent).setValue(value);
}
}
}
@ -362,7 +366,7 @@ public class Param {
private void _setValue(Object value, ValueProperty valueProperty) {
switch (valueProperty) {
case VALUE:
setValue(value);
setValue(value, false);
break;
case DEFAULT_VALUE:
setDefaultValue(value);