use of com.haulmont.cuba.web.toolkit.ui.CubaSearchSelect in project cuba by cuba-platform.
the class WebSearchField method createComponent.
@Override
protected void createComponent() {
this.component = new CubaSearchSelect() {
@Override
public void setPropertyDataSource(Property newDataSource) {
if (newDataSource == null) {
super.setPropertyDataSource(null);
} else {
super.setPropertyDataSource(new LookupPropertyAdapter(newDataSource));
}
}
@Override
public void setComponentError(ErrorMessage componentError) {
boolean handled = false;
if (componentErrorHandler != null) {
handled = componentErrorHandler.handleError(componentError);
}
if (!handled) {
super.setComponentError(componentError);
}
}
};
getSearchComponent().setFilterHandler(this::executeSearch);
}
Aggregations