use of com.haulmont.chile.core.model.utils.InstanceUtils in project cuba by cuba-platform.
the class WebLookupPickerField method createComponent.
@Override
protected void createComponent() {
super.createComponent();
// delegate error indication
this.componentErrorHandler = message -> {
if (message instanceof UserError) {
return false;
}
pickerField.component.setComponentError(message);
return true;
};
component.setCustomValueEquals(InstanceUtils::propertyValueEquals);
final ComboBox selectComponent = component;
final WebPickerField.Picker picker = new WebPickerField.Picker(this, component) {
@Override
public void setRequired(boolean required) {
super.setRequired(required);
selectComponent.setNullSelectionAllowed(!required);
}
};
pickerField = new WebPickerField(picker);
// Required for custom components in fieldgroup
initValueSync(selectComponent, picker);
}
Aggregations