diff --git a/modules/gui/src/com/haulmont/cuba/gui/xml/layout/loaders/SearchPickerFieldLoader.java b/modules/gui/src/com/haulmont/cuba/gui/xml/layout/loaders/SearchPickerFieldLoader.java index 0d9c861390..a7c755275e 100644 --- a/modules/gui/src/com/haulmont/cuba/gui/xml/layout/loaders/SearchPickerFieldLoader.java +++ b/modules/gui/src/com/haulmont/cuba/gui/xml/layout/loaders/SearchPickerFieldLoader.java @@ -55,11 +55,6 @@ public class SearchPickerFieldLoader extends SearchFieldLoader { if (StringUtils.isNotEmpty(minSearchStringLength)) { searchPickerField.setMinSearchStringLength(Integer.parseInt(minSearchStringLength)); } - - if (StringUtils.isEmpty(searchPickerField.getInputPrompt())) { - Messages messages = AppBeans.get(Messages.class); - searchPickerField.setInputPrompt(messages.getMainMessage("searchPickerField.inputPrompt")); - } } @Override diff --git a/modules/web/src/com/haulmont/cuba/web/gui/components/WebSearchPickerField.java b/modules/web/src/com/haulmont/cuba/web/gui/components/WebSearchPickerField.java index fc8cf6096a..688cccca11 100644 --- a/modules/web/src/com/haulmont/cuba/web/gui/components/WebSearchPickerField.java +++ b/modules/web/src/com/haulmont/cuba/web/gui/components/WebSearchPickerField.java @@ -18,6 +18,8 @@ package com.haulmont.cuba.web.gui.components; import com.haulmont.chile.core.model.MetaClass; +import com.haulmont.cuba.core.global.AppBeans; +import com.haulmont.cuba.core.global.Messages; import com.haulmont.cuba.gui.components.Action; import com.haulmont.cuba.gui.components.Frame; import com.haulmont.cuba.gui.components.SearchPickerField; @@ -27,6 +29,7 @@ import com.vaadin.data.Property; import com.vaadin.ui.ComboBox; import com.vaadin.ui.Component; import org.apache.commons.lang.ObjectUtils; +import org.apache.commons.lang.StringUtils; import javax.annotation.Nonnull; import javax.annotation.Nullable; @@ -48,6 +51,9 @@ public class WebSearchPickerField extends WebSearchField implements SearchPicker }; pickerField = new WebPickerField(picker); + Messages messages = AppBeans.get(Messages.class); + setInputPrompt(messages.getMainMessage("searchPickerField.inputPrompt")); + // Required for custom components in fieldgroup initValueSync(selectComponent, picker); }