use of com.haulmont.cuba.gui.components.SearchPickerField in project cuba by cuba-platform.
the class SearchPickerFieldLoader method loadComponent.
@Override
public void loadComponent() {
super.loadComponent();
SearchPickerField searchPickerField = (SearchPickerField) resultComponent;
String metaClass = element.attributeValue("metaClass");
if (!StringUtils.isEmpty(metaClass)) {
Metadata metadata = AppBeans.get(Metadata.NAME);
searchPickerField.setMetaClass(metadata.getSession().getClass(metaClass));
}
loadActions(searchPickerField, element);
if (searchPickerField.getActions().isEmpty()) {
searchPickerField.addLookupAction();
searchPickerField.addOpenAction();
}
String minSearchStringLength = element.attributeValue("minSearchStringLength");
if (StringUtils.isNotEmpty(minSearchStringLength)) {
searchPickerField.setMinSearchStringLength(Integer.parseInt(minSearchStringLength));
}
}
Aggregations