Package io.jmix.ui.component
Interface SuggestionFieldComponent<V,I>
- Type Parameters:
V- value type - collection or notI- item type
- All Superinterfaces:
Component,Component.BelongToFrame,Component.Editable,Component.Focusable,Component.HasCaption,Component.HasDescription,Component.HasIcon,Field<V>,HasContextHelp,HasEnterPressHandler,HasFormatter<I>,HasHtmlCaption,HasHtmlDescription,HasHtmlSanitizer,HasInputPrompt,HasOptionStyleProvider<I>,HasValidator<V>,HasValue<V>,HasValueSource<V>,Requirable,Validatable
- All Known Subinterfaces:
EntitySuggestionField<V>,SuggestionField<V>,TagField<V>
- All Known Implementing Classes:
AbstractSuggestionField,EntitySuggestionFieldImpl,SuggestionFieldImpl,TagFieldImpl
public interface SuggestionFieldComponent<V,I>
extends Field<V>, Component.Focusable, HasInputPrompt, HasOptionStyleProvider<I>, HasFormatter<I>, HasEnterPressHandler
Base interface for SuggestionField components.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classEvent is fired when user pressed ARROW_DOWN key without search action.static interfaceExtended version ofSuggestionFieldComponent.SearchExecutorthat allows to pass parameters.static interfaceCustom suggestions search action interface.Nested classes/interfaces inherited from interface io.jmix.ui.component.Component
Component.Alignment, Component.BelongToFrame, Component.Disposable, Component.Editable, Component.Focusable, Component.HasCaption, Component.HasDescription, Component.HasIcon, Component.HasXmlDescriptor, Component.WrapperNested classes/interfaces inherited from interface io.jmix.ui.component.HasContextHelp
HasContextHelp.ContextHelpIconClickEventNested classes/interfaces inherited from interface io.jmix.ui.component.HasEnterPressHandler
HasEnterPressHandler.EnterPressEventNested classes/interfaces inherited from interface io.jmix.ui.component.HasValue
HasValue.ValueChangeEvent<V> -
Field Summary
FieldsFields inherited from interface io.jmix.ui.component.Component
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE -
Method Summary
Modifier and TypeMethodDescriptionintintintvoidSets an ARROW_DOWN press handler.voidsetAsyncSearchDelayMs(int asyncSearchDelayMs) Sets delay between the last key press action and async search.voidsetMinSearchStringLength(int minSearchStringLength) Sets min string length which is required to perform suggestions search.voidsetPopupWidth(String width) Sets the givenwidthto the component popup.voidsetSearchExecutor(SuggestionFieldComponent.SearchExecutor<I> searchExecutor) SetsSuggestionFieldComponent.SearchExecutorwhich performs search.voidsetSuggestionsLimit(int suggestionsLimit) Sets limit of suggestions which will be shown.voidshowSuggestions(List<I> suggestions) Show passed suggestions in popup.Methods inherited from interface io.jmix.ui.component.Component
addStyleName, getAlignment, getHeight, getHeightSizeUnit, getId, getParent, getStyleName, getWidth, getWidthSizeUnit, isEnabled, isEnabledRecursive, isResponsive, isVisible, isVisibleRecursive, removeStyleName, setAlignment, setEnabled, setHeight, setHeightAuto, setHeightFull, setId, setParent, setResponsive, setSizeAuto, setSizeFull, setStyleName, setVisible, setWidth, setWidthAuto, setWidthFull, unwrap, unwrapComposition, unwrapCompositionOrNull, unwrapOrNull, withUnwrapped, withUnwrappedCompositionMethods inherited from interface io.jmix.ui.component.Component.BelongToFrame
getFrame, setFrameMethods inherited from interface io.jmix.ui.component.Component.Editable
isEditable, isEditableWithParent, setEditableMethods inherited from interface io.jmix.ui.component.Component.Focusable
focus, getTabIndex, isFocusable, setFocusable, setTabIndexMethods inherited from interface io.jmix.ui.component.Component.HasCaption
getCaption, setCaptionMethods inherited from interface io.jmix.ui.component.Component.HasDescription
getDescription, setDescriptionMethods inherited from interface io.jmix.ui.component.Component.HasIcon
getIcon, setIcon, setIconFromSetMethods inherited from interface io.jmix.ui.component.HasContextHelp
getContextHelpIconClickHandler, getContextHelpText, isContextHelpTextHtmlEnabled, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabledMethods inherited from interface io.jmix.ui.component.HasEnterPressHandler
getEnterPressHandler, setEnterPressHandlerMethods inherited from interface io.jmix.ui.component.HasFormatter
getFormatter, setFormatterMethods inherited from interface io.jmix.ui.component.HasHtmlCaption
isCaptionAsHtml, setCaptionAsHtmlMethods inherited from interface io.jmix.ui.component.HasHtmlDescription
isDescriptionAsHtml, setDescriptionAsHtmlMethods inherited from interface io.jmix.ui.component.HasHtmlSanitizer
isHtmlSanitizerEnabled, setHtmlSanitizerEnabledMethods inherited from interface io.jmix.ui.component.HasInputPrompt
getInputPrompt, setInputPromptMethods inherited from interface io.jmix.ui.component.HasOptionStyleProvider
getOptionStyleProvider, setOptionStyleProviderMethods inherited from interface io.jmix.ui.component.HasValidator
addValidator, addValidators, getValidators, removeValidatorMethods inherited from interface io.jmix.ui.component.HasValue
addValueChangeListener, clear, getEmptyValue, getValue, isEmpty, setValueMethods inherited from interface io.jmix.ui.component.data.HasValueSource
getValueSource, setValueSourceMethods inherited from interface io.jmix.ui.component.Requirable
getRequiredMessage, isRequired, setRequired, setRequiredMessageMethods inherited from interface io.jmix.ui.component.Validatable
isValid, isValidateOnCommit, validate
-
Field Details
-
POPUP_AUTO_WIDTH
- See Also:
-
POPUP_PARENT_WIDTH
- See Also:
-
-
Method Details
-
getAsyncSearchDelayMs
int getAsyncSearchDelayMs()- Returns:
- delay between the last key press action and async search
-
setAsyncSearchDelayMs
Sets delay between the last key press action and async search.- Parameters:
asyncSearchDelayMs- delay in ms
-
getSearchExecutor
- Returns:
SuggestionFieldComponent.SearchExecutorwhich performs search
-
setSearchExecutor
SetsSuggestionFieldComponent.SearchExecutorwhich performs search.- Parameters:
searchExecutor- SearchExecutor instance
-
getArrowDownHandler
- Returns:
- an ARROW_DOWN press handler
-
setArrowDownHandler
Sets an ARROW_DOWN press handler.- Parameters:
handler- an ARROW_DOWN press handler to set
-
getMinSearchStringLength
int getMinSearchStringLength()- Returns:
- min string length to perform suggestions search
-
setMinSearchStringLength
Sets min string length which is required to perform suggestions search.- Parameters:
minSearchStringLength- required string length to perform search
-
getSuggestionsLimit
int getSuggestionsLimit()- Returns:
- limit of suggestions which will be shown
-
setSuggestionsLimit
Sets limit of suggestions which will be shown.- Parameters:
suggestionsLimit- integer limit value
-
showSuggestions
Show passed suggestions in popup.- Parameters:
suggestions- suggestions to show
-
setPopupWidth
@StudioProperty(name="popupWidth", defaultValue="auto", type=STRING, options={"auto","parent"}) void setPopupWidth(String width) Sets the givenwidthto the component popup. There are two predefined settings available:POPUP_AUTO_WIDTHandPOPUP_PARENT_WIDTH.- Parameters:
width- width of the component popup
-
getPopupWidth
String getPopupWidth()- Returns:
- component popup width
-