Package com.storedobject.ui.inventory
Class LocationField
java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.AbstractField<com.vaadin.flow.component.combobox.ComboBox<InventoryLocation>,InventoryLocation>
com.vaadin.flow.component.AbstractSinglePropertyField<com.vaadin.flow.component.combobox.ComboBox<InventoryLocation>,InventoryLocation>
com.vaadin.flow.component.combobox.ComboBoxBase<com.vaadin.flow.component.combobox.ComboBox<InventoryLocation>,InventoryLocation,InventoryLocation>
com.vaadin.flow.component.combobox.ComboBox<InventoryLocation>
- All Implemented Interfaces:
ResourceOwner,FilterMethods<InventoryLocation>,ObjectGetter<InventoryLocation>,ObjectLoader<InventoryLocation>,ObjectSetter<InventoryLocation>,ObjectInput<InventoryLocation>,ObjectLoader<InventoryLocation>,ObjectProvider<InventoryLocation>,AbstractObjectInput<InventoryLocation>,HasElement,HasThemeStyle,SpellCheck,ValueRequired,com.vaadin.flow.component.AttachNotifier,com.vaadin.flow.component.BlurNotifier<com.vaadin.flow.component.combobox.ComboBox<InventoryLocation>>,com.vaadin.flow.component.DetachNotifier,com.vaadin.flow.component.Focusable<com.vaadin.flow.component.combobox.ComboBox<InventoryLocation>>,com.vaadin.flow.component.FocusNotifier<com.vaadin.flow.component.combobox.ComboBox<InventoryLocation>>,com.vaadin.flow.component.HasAriaLabel,com.vaadin.flow.component.HasElement,com.vaadin.flow.component.HasEnabled,com.vaadin.flow.component.HasHelper,com.vaadin.flow.component.HasLabel,com.vaadin.flow.component.HasPlaceholder,com.vaadin.flow.component.HasSize,com.vaadin.flow.component.HasStyle,com.vaadin.flow.component.HasTheme,com.vaadin.flow.component.HasValidation,com.vaadin.flow.component.HasValue<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<com.vaadin.flow.component.combobox.ComboBox<InventoryLocation>,,InventoryLocation>, InventoryLocation> com.vaadin.flow.component.HasValueAndElement<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<com.vaadin.flow.component.combobox.ComboBox<InventoryLocation>,,InventoryLocation>, InventoryLocation> com.vaadin.flow.component.shared.HasAllowedCharPattern,com.vaadin.flow.component.shared.HasAutoOpen,com.vaadin.flow.component.shared.HasClearButton,com.vaadin.flow.component.shared.HasClientValidation,com.vaadin.flow.component.shared.HasOverlayClassName,com.vaadin.flow.component.shared.HasPrefix,com.vaadin.flow.component.shared.HasThemeVariant<com.vaadin.flow.component.combobox.ComboBoxVariant>,com.vaadin.flow.component.shared.HasTooltip,com.vaadin.flow.component.shared.HasValidationProperties,com.vaadin.flow.component.shared.InputField<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<com.vaadin.flow.component.combobox.ComboBox<InventoryLocation>,,InventoryLocation>, InventoryLocation> com.vaadin.flow.data.binder.HasValidator<InventoryLocation>,com.vaadin.flow.data.provider.HasDataView<InventoryLocation,,String, com.vaadin.flow.component.combobox.dataview.ComboBoxDataView<InventoryLocation>> com.vaadin.flow.data.provider.HasLazyDataView<InventoryLocation,,String, com.vaadin.flow.component.combobox.dataview.ComboBoxLazyDataView<InventoryLocation>> com.vaadin.flow.data.provider.HasListDataView<InventoryLocation,,com.vaadin.flow.component.combobox.dataview.ComboBoxListDataView<InventoryLocation>> Serializable,Consumer<InventoryLocation>
Location field for accepting inventory locations.
- Author:
- Syam
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.vaadin.flow.component.combobox.ComboBox
com.vaadin.flow.component.combobox.ComboBox.ComboBoxI18n, com.vaadin.flow.component.combobox.ComboBox.FetchItemsCallback<T>, com.vaadin.flow.component.combobox.ComboBox.ItemFilter<T>Nested classes/interfaces inherited from class com.vaadin.flow.component.combobox.ComboBoxBase
com.vaadin.flow.component.combobox.ComboBoxBase.CustomValueSetEvent<TComponent extends com.vaadin.flow.component.combobox.ComboBoxBase<TComponent,?, ?>>, com.vaadin.flow.component.combobox.ComboBoxBase.SpringData Nested classes/interfaces inherited from class com.vaadin.flow.component.AbstractField
com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<C extends com.vaadin.flow.component.Component,V> Nested classes/interfaces inherited from interface com.vaadin.flow.component.BlurNotifier
com.vaadin.flow.component.BlurNotifier.BlurEvent<C extends com.vaadin.flow.component.Component>Nested classes/interfaces inherited from interface com.vaadin.flow.component.FocusNotifier
com.vaadin.flow.component.FocusNotifier.FocusEvent<C extends com.vaadin.flow.component.Component>Nested classes/interfaces inherited from interface com.vaadin.flow.component.shared.HasClientValidation
com.vaadin.flow.component.shared.HasClientValidation.ClientValidatedEventNested classes/interfaces inherited from interface com.vaadin.flow.component.HasValue
com.vaadin.flow.component.HasValue.ValueChangeEvent<V>, com.vaadin.flow.component.HasValue.ValueChangeListener<E extends com.vaadin.flow.component.HasValue.ValueChangeEvent<?>> -
Constructor Summary
ConstructorsConstructorDescriptionLocationField(int... types) Constructor.LocationField(String label, int... types) Constructor.LocationField(String label, List<InventoryLocation> list) Constructor.LocationField(List<InventoryLocation> list) -
Method Summary
Modifier and TypeMethodDescriptionstatic LocationFieldcreate(int... types) Create a location field.static LocationFieldcreate(InventoryLocation location) Create a location field for a given location.static LocationFieldCreate a location field.static LocationFieldcreate(String label, InventoryLocation location) Create a location field for a given location.static LocationFieldCreate a location field for a given location.static InventoryLocationgetLocation(String locationName, boolean allowEmptyName, int... types) Get the location for the given location name.static InventoryLocationgetLocation(String locationName, int... types) Get the location for the given location name.intGet the number of locations allowed in this field.Get the list of locations allowed in this field instance.static InventoryStoreGet the store for the given store name.remove(InventoryLocation location) Remove a location from the list of allowed locations.Methods inherited from class com.storedobject.ui.ObjectComboField
applyFilterPredicate, clear, filter, focus, get, getCached, getDelegatedLoader, getDetailComponent, getDisplayDetail, getInternalLabel, getObject, getObjectClass, getObjectCount, getResource, indexOf, isAllowAny, lessRows, load, reload, setDetailComponent, setDisplayDetail, setEnabled, setFilter, setFirstValue, setInternalLabel, setItemLabelGenerator, setPrefixFieldControl, setReadOnlyMethods inherited from class com.storedobject.vaadin.ComboField
addItems, addItems, addItems, getEmptyValue, getIndex, getIndex, getValue, items, removeItems, removeItems, removeItems, setIndex, setItems, sizeMethods inherited from class com.vaadin.flow.component.combobox.ComboBox
getI18n, getPattern, isSelected, refreshValue, setI18n, setOverlayWidth, setOverlayWidth, setPattern, setRequiredIndicatorVisibleMethods inherited from class com.vaadin.flow.component.combobox.ComboBoxBase
addCustomValueSetListener, generateClassName, generateLabel, getAriaLabel, getAriaLabelledBy, getDataCommunicator, getDataController, getDataGenerator, getDataProvider, getDefaultValidator, getFilter, getGenericDataView, getItemClassNameGenerator, getItemLabelGenerator, getKeyMapper, getLazyDataView, getListDataView, getPageSize, getRenderManager, isAllowCustomValue, isAutofocus, isOpened, isRequired, isRequiredIndicatorVisible, onAttach, onDetach, runBeforeClientResponse, setAllowCustomValue, setAriaLabel, setAriaLabelledBy, setAutofocus, setClassNameGenerator, setDataProvider, setDataProvider, setI18n, setItems, setItems, setItems, setItems, setItems, setItems, setItems, setItems, setItems, setItems, setItems, setItemsPageable, setItemsPageable, setItemsWithFilterConverter, setItemsWithFilterConverter, setManualValidation, setOpened, setPageSize, setRenderer, setRequired, setValue, validateMethods inherited from class com.vaadin.flow.component.AbstractSinglePropertyField
getSynchronizationRegistration, hasValidValue, setPresentationValue, setSynchronizedEventMethods inherited from class com.vaadin.flow.component.AbstractField
addValueChangeListener, getValue, isEmpty, setModelValue, valueEqualsMethods inherited from class com.vaadin.flow.component.Component
addListener, findAncestor, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getListeners, getLocale, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onEnabledStateChanged, removeFromParent, scrollIntoView, scrollIntoView, set, setElement, setId, setVisibleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.storedobject.ui.util.AbstractObjectInput
convert, getObject, getObjectId, getObjectId, setCached, setObjectMethods inherited from interface com.vaadin.flow.component.AttachNotifier
addAttachListenerMethods inherited from interface com.vaadin.flow.component.BlurNotifier
addBlurListenerMethods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListenerMethods inherited from interface com.storedobject.core.FilterMethods
getFilterCondition, setFilter, setFilter, setFilter, setFilter, setFilter, setLoadFilter, setLoadFilter, setViewFilter, setViewFilterMethods inherited from interface com.vaadin.flow.component.Focusable
addFocusShortcut, blur, getTabIndex, setTabIndexMethods inherited from interface com.vaadin.flow.component.FocusNotifier
addFocusListenerMethods inherited from interface com.vaadin.flow.component.shared.HasAllowedCharPattern
getAllowedCharPattern, setAllowedCharPatternMethods inherited from interface com.vaadin.flow.component.shared.HasAutoOpen
isAutoOpen, setAutoOpenMethods inherited from interface com.vaadin.flow.component.shared.HasClearButton
isClearButtonVisible, setClearButtonVisibleMethods inherited from interface com.vaadin.flow.component.shared.HasClientValidation
addClientValidatedEventListenerMethods inherited from interface com.storedobject.vaadin.HasElement
getAttribute, getStyle, setAttribute, setStyleMethods inherited from interface com.vaadin.flow.component.HasElement
getElementMethods inherited from interface com.vaadin.flow.component.HasEnabled
isEnabledMethods inherited from interface com.vaadin.flow.component.HasHelper
getHelperComponent, getHelperText, setHelperComponent, setHelperTextMethods inherited from interface com.vaadin.flow.component.HasLabel
getLabel, setLabelMethods inherited from interface com.vaadin.flow.component.shared.HasOverlayClassName
getOverlayClassName, setOverlayClassNameMethods inherited from interface com.vaadin.flow.component.HasPlaceholder
getPlaceholder, setPlaceholderMethods inherited from interface com.vaadin.flow.component.shared.HasPrefix
getPrefixComponent, setPrefixComponentMethods inherited from interface com.vaadin.flow.component.HasSize
getHeight, getHeightUnit, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getWidth, getWidthUnit, setHeight, setHeight, setHeightFull, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFullMethods inherited from interface com.vaadin.flow.component.HasStyle
addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassNameMethods inherited from interface com.vaadin.flow.component.HasTheme
addThemeName, addThemeNames, getThemeName, getThemeNames, hasThemeName, removeThemeName, removeThemeNames, setThemeName, setThemeNameMethods inherited from interface com.storedobject.vaadin.HasThemeStyle
addTheme, asPrimary, asSmall, clearThemes, getInternalElement, removeTheme, setThemeMethods inherited from interface com.vaadin.flow.component.shared.HasThemeVariant
addThemeVariants, removeThemeVariantsMethods inherited from interface com.vaadin.flow.component.shared.HasTooltip
getTooltip, setTooltipTextMethods inherited from interface com.vaadin.flow.component.shared.HasValidationProperties
getErrorMessage, isInvalid, setErrorMessage, setInvalidMethods inherited from interface com.vaadin.flow.data.binder.HasValidator
addValidationStatusChangeListenerMethods inherited from interface com.vaadin.flow.component.HasValue
addValueChangeListener, getOptionalValue, getValue, isEmptyMethods inherited from interface com.vaadin.flow.component.HasValueAndElement
isReadOnlyMethods inherited from interface com.storedobject.ui.ObjectInput
getObject, getSearcher, getValue, setObject, setObjectClass, setValue, setValueMethods inherited from interface com.storedobject.core.ObjectLoader
applyFilter, canContain, getAllowAny, getLinkType, getMaster, getOrderBy, load, load, load, load, load, load, load, load, load, load, load, load, load, load, load, load, load, load, load, load, load, load, setLinkType, setLinkType, setMaster, setMaster, setOrderBy, setOrderByMethods inherited from interface com.storedobject.ui.ObjectLoader
addDataLoadedListener, clear, getCacheLevel, getEffectiveCondition, getFixedFilter, getLoadFilter, setExtraFilter, setExtraFilter, setFilter, setFilter, setFixedFilter, setFixedFilter, setFixedFilter, setFixedFilter, size, streamAll, streamFilteredMethods inherited from interface com.storedobject.core.ObjectSetter
acceptMethods inherited from interface com.storedobject.vaadin.SpellCheck
setSpellCheckMethods inherited from interface com.storedobject.vaadin.ValueRequired
isRequired, setRequired
-
Constructor Details
-
LocationField
public LocationField(int... types) Constructor.- Parameters:
types- Types of locations to be allowed. SeeInventoryLocation.getType().
-
LocationField
Constructor.- Parameters:
label- Label.types- Types of locations to be allowed. SeeInventoryLocation.getType().
-
LocationField
-
LocationField
Constructor.- Parameters:
label- Label.list- List of allowed locations.
-
-
Method Details
-
create
Create a location field.- Parameters:
types- Types of locations to be allowed. SeeInventoryLocation.getType().
-
create
Create a location field.- Parameters:
label- Label.types- Types of locations to be allowed. SeeInventoryLocation.getType().
-
create
Create a location field for a given location.- Parameters:
label- Label.locationName- Name of the location.types- Types of locations to be allowed. SeeInventoryLocation.getType().
-
create
Create a location field for a given location.- Parameters:
location- Location.
-
create
Create a location field for a given location.- Parameters:
label- Label.location- Location.
-
getLocations
Get the list of locations allowed in this field instance.- Returns:
- List of allowed locations.
-
getLocationCount
public int getLocationCount()Get the number of locations allowed in this field.- Returns:
- Location count.
-
remove
Remove a location from the list of allowed locations.- Parameters:
location- Location to be removed.- Returns:
- Self-reference.
-
getStore
Get the store for the given store name.- Parameters:
storeName- Name of the store.- Returns:
- Store or null if the store can't be identified from the name.
-
getLocation
Get the location for the given location name. A run-time exception is raised if the location can't be found.- Parameters:
locationName- Name of the location.- Returns:
- Location or null if the empty location name is passed.
-
getLocation
public static InventoryLocation getLocation(String locationName, boolean allowEmptyName, int... types) Get the location for the given location name. A run-time exception is raised if the location can't be found.- Parameters:
locationName- Name of the location.allowEmptyName- If true, null will be returned if the location name passed is null or empty.- Returns:
- Location or null if an empty location name is passed and the parameter allowEmptyName is true.
-