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
Modifier and TypeInterfaceDescriptionstatic class
Event is fired when user pressed ARROW_DOWN key without search action.static interface
Extended version ofSuggestionFieldComponent.SearchExecutor
that allows to pass parameters.static interface
Custom 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.Wrapper
Nested classes/interfaces inherited from interface io.jmix.ui.component.HasContextHelp
HasContextHelp.ContextHelpIconClickEvent
Nested classes/interfaces inherited from interface io.jmix.ui.component.HasEnterPressHandler
HasEnterPressHandler.EnterPressEvent
Nested classes/interfaces inherited from interface io.jmix.ui.component.HasValue
HasValue.ValueChangeEvent<V>
-
Field Summary
Fields inherited from interface io.jmix.ui.component.Component
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE
-
Method Summary
Modifier and TypeMethodDescriptionint
int
int
void
Sets an ARROW_DOWN press handler.void
setAsyncSearchDelayMs
(int asyncSearchDelayMs) Sets delay between the last key press action and async search.void
setMinSearchStringLength
(int minSearchStringLength) Sets min string length which is required to perform suggestions search.void
setPopupWidth
(String width) Sets the givenwidth
to the component popup.void
setSearchExecutor
(SuggestionFieldComponent.SearchExecutor<I> searchExecutor) SetsSuggestionFieldComponent.SearchExecutor
which performs search.void
setSuggestionsLimit
(int suggestionsLimit) Sets limit of suggestions which will be shown.void
showSuggestions
(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, withUnwrappedComposition
Methods inherited from interface io.jmix.ui.component.Component.BelongToFrame
getFrame, setFrame
Methods inherited from interface io.jmix.ui.component.Component.Editable
isEditable, isEditableWithParent, setEditable
Methods inherited from interface io.jmix.ui.component.Component.Focusable
focus, getTabIndex, isFocusable, setFocusable, setTabIndex
Methods inherited from interface io.jmix.ui.component.Component.HasCaption
getCaption, setCaption
Methods inherited from interface io.jmix.ui.component.Component.HasDescription
getDescription, setDescription
Methods inherited from interface io.jmix.ui.component.Component.HasIcon
getIcon, setIcon, setIconFromSet
Methods inherited from interface io.jmix.ui.component.HasContextHelp
getContextHelpIconClickHandler, getContextHelpText, isContextHelpTextHtmlEnabled, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabled
Methods inherited from interface io.jmix.ui.component.HasEnterPressHandler
getEnterPressHandler, setEnterPressHandler
Methods inherited from interface io.jmix.ui.component.HasFormatter
getFormatter, setFormatter
Methods inherited from interface io.jmix.ui.component.HasHtmlCaption
isCaptionAsHtml, setCaptionAsHtml
Methods inherited from interface io.jmix.ui.component.HasHtmlDescription
isDescriptionAsHtml, setDescriptionAsHtml
Methods inherited from interface io.jmix.ui.component.HasHtmlSanitizer
isHtmlSanitizerEnabled, setHtmlSanitizerEnabled
Methods inherited from interface io.jmix.ui.component.HasInputPrompt
getInputPrompt, setInputPrompt
Methods inherited from interface io.jmix.ui.component.HasOptionStyleProvider
getOptionStyleProvider, setOptionStyleProvider
Methods inherited from interface io.jmix.ui.component.HasValidator
addValidator, addValidators, getValidators, removeValidator
Methods inherited from interface io.jmix.ui.component.HasValue
addValueChangeListener, clear, getEmptyValue, getValue, isEmpty, setValue
Methods inherited from interface io.jmix.ui.component.data.HasValueSource
getValueSource, setValueSource
Methods inherited from interface io.jmix.ui.component.Requirable
getRequiredMessage, isRequired, setRequired, setRequiredMessage
Methods 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.SearchExecutor
which performs search
-
setSearchExecutor
SetsSuggestionFieldComponent.SearchExecutor
which 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 givenwidth
to the component popup. There are two predefined settings available:POPUP_AUTO_WIDTH
andPOPUP_PARENT_WIDTH
.- Parameters:
width
- width of the component popup
-
getPopupWidth
String getPopupWidth()- Returns:
- component popup width
-