V - single value type or CollectionI - item typeT - Vaadin component typepublic abstract class AbstractSelectList<V,I,T extends JmixAbstractListSelect<I>> extends AbstractField<T,java.util.Set<I>,V> implements SelectList<V,I>, org.springframework.beans.factory.InitializingBean
SelectList.DoubleClickEvent<I>HasValue.ValueChangeEvent<V>Component.Alignment, Component.BelongToFrame, Component.Disposable, Component.Editable, Component.Focusable, Component.HasCaption, Component.HasDescription, Component.HasIcon, Component.HasXmlDescriptor, Component.WrapperHasContextHelp.ContextHelpIconClickEvent| Modifier and Type | Field and Description |
|---|---|
protected io.jmix.core.MetadataTools |
metadataTools |
protected java.util.function.Function<? super I,java.lang.String> |
optionCaptionProvider |
protected OptionsBinding<I> |
optionsBinding |
editable, parentEditableChangeListener, validators, VALIDATORS_LIST_INITIAL_CAPACITYinternalValue, uiTestIdsSupport, valueBindingalignment, applicationContext, component, contextHelpIconClickHandler, contextHelpIconClickListener, descriptionAsHtml, element, frame, htmlSanitizerEnabled, icon, ICON_STYLE, id, parentAUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE| Constructor and Description |
|---|
AbstractSelectList() |
| Modifier and Type | Method and Description |
|---|---|
io.jmix.core.common.event.Subscription |
addDoubleClickListener(java.util.function.Consumer<SelectList.DoubleClickEvent<I>> listener)
Adds a listener that is fired when user double-clicks on a list item.
|
void |
afterPropertiesSet() |
protected void |
componentValueChanged(java.util.Set<I> prevComponentValue,
java.util.Set<I> newComponentValue,
boolean isUserOriginated) |
protected abstract T |
createComponent() |
void |
focus()
Sets focus to this component
|
protected java.lang.String |
generateDefaultItemCaption(I item) |
protected java.lang.String |
generateItemCaption(I item) |
protected abstract java.util.Collection<I> |
getCollectionValue() |
java.util.function.Function<? super I,java.lang.String> |
getOptionCaptionProvider() |
Options<I> |
getOptions() |
int |
getTabIndex()
Gets the tabulator index of the
HasTabIndex component. |
protected void |
initComponent(T component) |
protected void |
onDoubleClick(I item) |
protected void |
setItemsToPresentation(java.util.stream.Stream<I> options) |
void |
setMetadataTools(io.jmix.core.MetadataTools metadataTools) |
void |
setOptionCaptionProvider(java.util.function.Function<? super I,java.lang.String> optionCaptionProvider)
Sets function that provides caption for option items.
|
void |
setOptions(Options<I> options)
Sets options for UI component.
|
void |
setTabIndex(int tabIndex)
Sets the tabulator index of the
Focusable component. |
protected void |
valueBindingConnected(ValueSource<V> valueSource) |
addValidator, attachValueChangeListener, getDatatypeConversionErrorMsg, getDefaultRequiredMessage, getErrorMessage, getRequiredMessage, getValidators, isEditable, isRequired, isValid, removeValidator, setEditable, setEditableToComponent, setParent, setRequired, setRequiredMessage, setupComponentErrorProvider, triggerValidators, validateaddValueChangeListener, commit, convertToModel, convertToPresentation, discard, fieldValueEquals, getValue, getValueSource, isBuffered, isModified, setBuffered, setUiTestId, setUiTestIdsSupport, setValue, setValueSource, setValueToPresentation, valueBindingActivatedaddAttachListener, addDetachListener, addStyleName, assignDebugId, attached, detached, getAlignment, getCaption, getComponent, getComposition, getContextHelpIconClickHandler, getContextHelpText, getDebugId, getDescription, getEventHub, getFrame, getHeight, getHeightSizeUnit, getHtmlSanitizer, getIcon, getIconName, getIconResource, getId, getParent, getStyleName, getUiComponentProperties, getUiProperties, getWidth, getWidthSizeUnit, getXmlDescriptor, hasSubscriptions, hasValidationError, isAttached, isCaptionAsHtml, isContextHelpTextHtmlEnabled, isDescriptionAsHtml, isEnabled, isEnabledRecursive, isHtmlSanitizerEnabled, isResponsive, isVisible, isVisibleRecursive, onContextHelpIconClick, publish, removeStyleName, sanitize, setAlignment, setApplicationContext, setCaption, setCaptionAsHtml, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabled, setDebugId, setDescription, setDescriptionAsHtml, setEnabled, setFrame, setHeight, setHtmlSanitizerEnabled, setIcon, setIconFromSet, setId, setResponsive, setStyleName, setValidationError, setVisible, setWidth, setXmlDescriptor, unsubscribe, unwrap, unwrapComposition, unwrapCompositionOrNull, unwrapOrNull, withUnwrapped, withUnwrappedCompositionclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsetOptionsEnum, setOptionsList, setOptionsMapgetValueSource, setValueSourceaddValueChangeListener, clear, getEmptyValue, getValue, isEmpty, setValueisEditable, isEditableWithParent, setEditablegetFrame, setFrameaddStyleName, 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, withUnwrappedCompositionisValid, isValidateOnCommit, validategetIcon, setIcon, setIconFromSetgetContextHelpIconClickHandler, getContextHelpText, isContextHelpTextHtmlEnabled, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabledisCaptionAsHtml, setCaptionAsHtmlgetCaption, setCaptiongetDescription, setDescriptionisDescriptionAsHtml, setDescriptionAsHtmlisHtmlSanitizerEnabled, setHtmlSanitizerEnabledaddValidator, addValidators, getValidators, removeValidatorgetRequiredMessage, isRequired, setRequired, setRequiredMessageisFocusable, setFocusableprotected io.jmix.core.MetadataTools metadataTools
protected OptionsBinding<I> optionsBinding
protected java.util.function.Function<? super I,java.lang.String> optionCaptionProvider
@Autowired public void setMetadataTools(io.jmix.core.MetadataTools metadataTools)
protected abstract T createComponent()
public void afterPropertiesSet()
throws java.lang.Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanjava.lang.Exceptionprotected void initComponent(T component)
public void setOptionCaptionProvider(@Nullable
java.util.function.Function<? super I,java.lang.String> optionCaptionProvider)
HasOptionCaptionProvidersetOptionCaptionProvider in interface HasOptionCaptionProvider<I>optionCaptionProvider - caption provider for options@Nullable public java.util.function.Function<? super I,java.lang.String> getOptionCaptionProvider()
getOptionCaptionProvider in interface HasOptionCaptionProvider<I>public io.jmix.core.common.event.Subscription addDoubleClickListener(java.util.function.Consumer<SelectList.DoubleClickEvent<I>> listener)
SelectListaddDoubleClickListener in interface SelectList<V,I>listener - a listener to addpublic void focus()
Component.Focusablefocus in interface Component.Focusablepublic int getTabIndex()
Component.FocusableHasTabIndex component.getTabIndex in interface Component.FocusableHasTabIndex componentpublic void setTabIndex(int tabIndex)
Component.FocusableFocusable component.
The tab index property is used to specify the order in which the
fields are focused when the user presses the Tab key. Components with
a defined tab index are focused sequentially first, and then the
components with no tab index.setTabIndex in interface Component.FocusabletabIndex - tab index@Nullable public Options<I> getOptions()
getOptions in interface OptionsField<V,I>public void setOptions(@Nullable
Options<I> options)
OptionsFieldsetOptions in interface OptionsField<V,I>options - optionsListOptionsprotected void setItemsToPresentation(java.util.stream.Stream<I> options)
protected abstract java.util.Collection<I> getCollectionValue()
protected void componentValueChanged(java.util.Set<I> prevComponentValue, java.util.Set<I> newComponentValue, boolean isUserOriginated)
componentValueChanged in class AbstractValueComponent<T extends JmixAbstractListSelect<I>,java.util.Set<I>,V>protected void valueBindingConnected(ValueSource<V> valueSource)
valueBindingConnected in class AbstractValueComponent<T extends JmixAbstractListSelect<I>,java.util.Set<I>,V>protected java.lang.String generateDefaultItemCaption(I item)
@Nullable
protected java.lang.String generateItemCaption(@Nullable
I item)
protected void onDoubleClick(I item)