T - The type of a single option valuepublic class Select<T> extends AbstractSelect<T,T,Select<T>>
AbstractSelect.CloseMenuHandler<V>, AbstractSelect.DropDownPositionDown, AbstractSelect.DropDownPositionUp, AbstractSelect.OnAddOptionHandler<V>, AbstractSelect.OptionRenderer<T>, AbstractSelect.PopupPositionTopDown<T,V,S extends AbstractSelect<T,V,S>>, AbstractSelect.SelectionHandler<V>ValueBox.AutoValidate, ValueBox.AutoValidatorBasicFormElement.FieldHandler<T>BaseDominoElement.ElementHandler<T>, BaseDominoElement.ResizeHandler<T>, BaseDominoElement.StyleEditor<E extends elemental2.dom.HTMLElement,T extends org.jboss.elemento.IsElement<E>>, BaseDominoElement.WavesStylerHasChangeHandlers.ChangeHandler<V>HasValidation.ValidatorbuttonValueContainer, noneOption, options, valuesContainerchangeHandlers, changeListener, DISABLED, fieldContainer, fieldGroup, FLOATING, FOCUSED, inputContainer, inputListenerelement| Constructor and Description |
|---|
Select()
Creates an instance without a label
|
Select(List<SelectOption<T>> options)
Creates an instance without a label and initialized with a list of options
|
Select(String label)
Creates an instance with a label
|
Select(String label,
List<SelectOption<T>> options)
Creates an instance with a label and initialized with a list of options
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
clearValue(boolean silent)
clear the field value
|
static <T> Select<T> |
create()
Creates an instance without a label
|
static <T> Select<T> |
create(List<SelectOption<T>> options)
Creates an instance without a label and initialized with a list of options
|
static <T> Select<T> |
create(String label)
Creates an instance with a label
|
static <T> Select<T> |
create(String label,
List<SelectOption<T>> options)
Creates an instance with a label and initialized with a list of options
|
DropDownMenu |
getOptionsMenu() |
int |
getSelectedIndex() |
SelectOption<T> |
getSelectedOption() |
String |
getStringValue() |
T |
getValue() |
boolean |
isEmpty() |
boolean |
isEmptyIgnoreSpaces() |
boolean |
isSelected() |
static <T extends Enum<T>> |
ofEnum(String label,
T[] values) |
protected void |
scrollToSelectedOption()
implementation of this method will determine how the select will scroll to the selected option
when opens the dropdown menu
|
Select<T> |
select(SelectOption<T> option,
boolean silent)
Selects the option at the specified index if exists and set its value as the select value
|
Select<T> |
setValue(T value,
boolean silent)
Set the value with the ability to do so without triggering change handlers
|
addGroup, addOptions, addSelectionHandler, appendChild, appendChild, clear, close, closeAllSelects, closeMenu, containsKey, containsValue, createAutoValidator, createInputElement, createMandatoryAddOn, disable, divider, doSetValue, dropdown, dropup, enable, getButtonValueContainer, getClearableText, getDropDirection, getKeys, getOptionAt, getOptions, getSelectButton, getSelectLabel, getValues, hidePlaceholder, insertFirst, isAutoCloseOnSelect, isClearable, isClosePopOverOnOpen, isCreatable, isEnabled, isSearchable, onSelection, open, removeAllOptions, removeOption, removeOptions, removeSelectionHandler, select, selectAt, selectAt, selectByKey, selectByKey, setArrowIconSupplier, setAutoCloseOnSelect, setClearable, setClearableText, setClosePopOverOnOpen, setCreatable, setDropPosition, setOnAddOptionHandler, setOptionRenderer, setPopupWidth, setReadOnly, setSearchable, setSearchFilter, showPlaceholder, valuegetMaxLength, getMinLength, getMinLengthErrorMessage, setMaxLength, setMinLength, setMinLengthErrorMessage, updateCharacterCountaddChangeHandler, addLeftAddOn, addLeftAddOn, addLeftAddOn, addOnClearHandler, addRightAddOn, addRightAddOn, addRightAddOn, allowEmptyLabel, asTableField, autoValidate, callChangeHandlers, changeLabelFloating, clear, clearInvalid, clearValue, condense, createLabelElement, doFocus, doUnfocus, element, floating, floatLabel, focus, getAdditionalInfoContainer, getCountItem, getErrorItem, getErrorsContainer, getFieldContainer, getFieldGroup, getFieldInputContainer, getFieldStyle, getFocusColor, getHelperContainer, getHelpItem, getInputContainer, getInputElement, getLabelElement, getLabelTextElement, getLeftAddonContainer, getLeftAddOnsContainer, getMandatoryAddOn, getNotesContainer, getOnClearHandlers, getPlaceholder, getPostfix, getPostFixItem, getPrefix, getPrefixItem, getRightAddonContainer, getRightAddOnsContainer, hasChangeHandler, hideLabelText, invalidate, invalidate, isAddFocusColor, isAutoValidation, isFloating, isFocused, isReadOnly, linkLabelToField, nonfloating, onEnterKey, pauseChangeHandlers, pauseFocusValidation, removeChangeHandler, removeLeftAddOn, removeLeftAddOn, removeLeftAddOn, removeLeftAddOn, removeLeftAddOns, removeOnClearHandler, removeRightAddOn, removeRightAddOn, removeRightAddOn, removeRightAddOn, removeRightAddOns, resumeChangeHandlers, resumeFocusValidation, setAutoValidation, setFieldStyle, setFixErrorsPosition, setFloating, setFocusColor, setLabel, setLabel, setLabel, setLabel, setLabelTextVisible, setPauseChangeHandlers, setPlaceholder, setPostFix, setPrefix, setSpellCheck, setTableField, shouldShowPlaceholder, showLabelText, spread, unfloatLabel, unfocus, updateLabel, valueaddValidator, getErrorLabels, getErrors, getHelperText, getLabel, getName, getRequiredErrorMessage, groupBy, hasValidator, isDisabled, isFixErrorsPosition, isRequired, isShowRequiredIndicator, isValidationDisabled, makeErrorLabel, removeValidator, setHelperText, setName, setRequired, setRequired, setRequiredErrorMessage, setShowRequiredIndicator, setValidationDisabled, setValue, showErrors, ungroup, validate, withValidationDisabledadd, add, addClickListener, addCss, addCss, addEventListener, addEventListener, addEventsListener, addHideListener, addShowListener, alignCenter, alignRight, appendChild, appendChild, apply, attr, blur, childNodes, clearElement, contains, contains, contains, containsCss, css, css, cssClassByIndex, cssClassesCount, cssText, elevate, elevate, firstChild, getAttachObserver, getAttribute, getBoundingClientRect, getChildElementCount, getClickableElement, getCollapsible, getCollapsibleElement, getDetachObserver, getDominoId, getElementsCount, getElevation, getFirstChild, getId, getTextContent, getTooltip, getWavesElement, hasAttribute, hasChildNodes, hasDirectChild, hide, hideOn, id, init, insertAfter, insertAfter, insertAfter, insertAfter, insertBefore, insertBefore, insertBefore, insertBefore, insertFirst, insertFirst, insertFirst, isAttached, isCollapsed, isEmptyElement, isEqualNode, isForceHidden, isHidden, item, lastChild, length, onAttached, onDetached, onResize, pullLeft, pullRight, querySelector, querySelectorAll, remove, removeAttachObserver, removeAttribute, removeChild, removeChild, removeCss, removeCss, removeCssProperty, removeDetachObserver, removeEventListener, removeEventListener, removeHideListener, removeHideOn, removeShowListener, removeShowOn, removeTooltip, removeWaves, replaceCss, setAlignItems, setAttribute, setAttribute, setAttribute, setBackgroundColor, setBackgroundColor, setBorder, setBorderColor, setBottom, setBottom, setBoxShadow, setCollapseStrategy, setColor, setColor, setContent, setContent, setCssProperty, setCssProperty, setCursor, setCursor, setDisabled, setDisplay, setDisplay, setDropMenu, setFlex, setFloat, setFloat, setFontSize, setFontSize, setForceHidden, setHeight, setHeight, setId, setInnerHtml, setLeft, setLeft, setLineHeight, setLineHeight, setMargin, setMargin, setMarginBottom, setMarginBottom, setMarginLeft, setMarginLeft, setMarginRight, setMarginRight, setMarginTop, setMarginTop, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setOpacity, setOpacity, setOverFlow, setOverFlow, setOverFlowY, setPadding, setPadding, setPaddingBottom, setPaddingBottom, setPaddingLeft, setPaddingLeft, setPaddingRight, setPaddingRight, setPaddingTop, setPaddingTop, setPointerEvents, setPosition, setPosition, setRight, setRight, setTabIndex, setTextAlign, setTextAlign, setTextContent, setTooltip, setTooltip, setTooltip, setTooltip, setTop, setTop, setTransitionDuration, setWidth, setWidth, setZIndex, show, showOn, style, style, styler, textContent, toggleDisplay, toggleDisplay, withWaves, withWavesclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitvalidateAllisExpandedadd, add, remove, remove, removeProperty, replace, setProperty, setPropertypublic Select()
public Select(String label)
label - Stringpublic Select(List<SelectOption<T>> options)
options - List of SelectOptionpublic Select(String label, List<SelectOption<T>> options)
label - Stringoptions - List of SelectOptionpublic static <T> Select<T> create()
T - Type the select options valuepublic static <T> Select<T> create(String label)
T - Type the select options valuelabel - Stringpublic static <T> Select<T> create(String label, List<SelectOption<T>> options)
T - Type the select options valuelabel - Stringoptions - List of SelectOptionpublic static <T> Select<T> create(List<SelectOption<T>> options)
T - Type the select options valueoptions - List of SelectOptionpublic DropDownMenu getOptionsMenu()
getOptionsMenu in class AbstractSelect<T,T,Select<T>>DropDownMenu of this selectpublic Select<T> select(SelectOption<T> option, boolean silent)
select in class AbstractSelect<T,T,Select<T>>option - SelectOptionsilent - boolean, true to avoid triggering change handlerspublic SelectOption<T> getSelectedOption()
SelectOptionpublic Select<T> setValue(T value, boolean silent)
public T getValue()
public String getStringValue()
getStringValue in interface HasInputElementgetStringValue in class ValueBox<Select<T>,elemental2.dom.HTMLElement,T>protected void clearValue(boolean silent)
clearValue in class ValueBox<Select<T>,elemental2.dom.HTMLElement,T>public int getSelectedIndex()
SelectOptionprotected void scrollToSelectedOption()
scrollToSelectedOption in class AbstractSelect<T,T,Select<T>>public boolean isEmpty()
AbstractValueBoxisEmpty in interface HasGrouping<Select<T>>isEmpty in class AbstractValueBox<Select<T>,elemental2.dom.HTMLElement,T>public boolean isEmptyIgnoreSpaces()
AbstractValueBoxisEmptyIgnoreSpaces in interface HasGrouping<Select<T>>isEmptyIgnoreSpaces in class AbstractValueBox<Select<T>,elemental2.dom.HTMLElement,T>public boolean isSelected()
isSelected in class AbstractSelect<T,T,Select<T>>Copyright © 2019–2022 Dominokit. All rights reserved.