Search in sources :

Example 1 with CubaSearchSelect

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);
}
Also used : CubaSearchSelect(com.haulmont.cuba.web.toolkit.ui.CubaSearchSelect) ErrorMessage(com.vaadin.server.ErrorMessage) Property(com.vaadin.data.Property)

Aggregations

CubaSearchSelect (com.haulmont.cuba.web.toolkit.ui.CubaSearchSelect)1 Property (com.vaadin.data.Property)1 ErrorMessage (com.vaadin.server.ErrorMessage)1