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.ClientValidatedEvent
Nested 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 LocationField
create
(int... types) Create a location field.static LocationField
create
(InventoryLocation location) Create a location field for a given location.static LocationField
Create a location field.static LocationField
create
(String label, InventoryLocation location) Create a location field for a given location.static LocationField
Create a location field for a given location.static InventoryLocation
getLocation
(String locationName, boolean allowEmptyName, int... types) Get the location for the given location name.static InventoryLocation
getLocation
(String locationName, int... types) Get the location for the given location name.int
Get the number of locations allowed in this field.Get the list of locations allowed in this field instance.static InventoryStore
Get 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, setReadOnly
Methods inherited from class com.storedobject.vaadin.ComboField
addItems, addItems, addItems, getEmptyValue, getIndex, getIndex, getValue, items, removeItems, removeItems, removeItems, setIndex, setItems, size
Methods inherited from class com.vaadin.flow.component.combobox.ComboBox
getI18n, getPattern, isSelected, refreshValue, setI18n, setOverlayWidth, setOverlayWidth, setPattern, setRequiredIndicatorVisible
Methods 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, validate
Methods inherited from class com.vaadin.flow.component.AbstractSinglePropertyField
getSynchronizationRegistration, hasValidValue, setPresentationValue, setSynchronizedEvent
Methods inherited from class com.vaadin.flow.component.AbstractField
addValueChangeListener, getValue, isEmpty, setModelValue, valueEquals
Methods 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, setVisible
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.storedobject.ui.util.AbstractObjectInput
convert, getObject, getObjectId, getObjectId, setCached, setObject
Methods inherited from interface com.vaadin.flow.component.AttachNotifier
addAttachListener
Methods inherited from interface com.vaadin.flow.component.BlurNotifier
addBlurListener
Methods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListener
Methods inherited from interface com.storedobject.core.FilterMethods
getFilterCondition, setFilter, setFilter, setFilter, setFilter, setFilter, setLoadFilter, setLoadFilter, setViewFilter, setViewFilter
Methods inherited from interface com.vaadin.flow.component.Focusable
addFocusShortcut, blur, getTabIndex, setTabIndex
Methods inherited from interface com.vaadin.flow.component.FocusNotifier
addFocusListener
Methods inherited from interface com.vaadin.flow.component.shared.HasAllowedCharPattern
getAllowedCharPattern, setAllowedCharPattern
Methods inherited from interface com.vaadin.flow.component.shared.HasAutoOpen
isAutoOpen, setAutoOpen
Methods inherited from interface com.vaadin.flow.component.shared.HasClearButton
isClearButtonVisible, setClearButtonVisible
Methods inherited from interface com.vaadin.flow.component.shared.HasClientValidation
addClientValidatedEventListener
Methods inherited from interface com.storedobject.vaadin.HasElement
getAttribute, getStyle, setAttribute, setStyle
Methods inherited from interface com.vaadin.flow.component.HasElement
getElement
Methods inherited from interface com.vaadin.flow.component.HasEnabled
isEnabled
Methods inherited from interface com.vaadin.flow.component.HasHelper
getHelperComponent, getHelperText, setHelperComponent, setHelperText
Methods inherited from interface com.vaadin.flow.component.HasLabel
getLabel, setLabel
Methods inherited from interface com.vaadin.flow.component.shared.HasOverlayClassName
getOverlayClassName, setOverlayClassName
Methods inherited from interface com.vaadin.flow.component.HasPlaceholder
getPlaceholder, setPlaceholder
Methods inherited from interface com.vaadin.flow.component.shared.HasPrefix
getPrefixComponent, setPrefixComponent
Methods 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, setWidthFull
Methods inherited from interface com.vaadin.flow.component.HasStyle
addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName
Methods inherited from interface com.vaadin.flow.component.HasTheme
addThemeName, addThemeNames, getThemeName, getThemeNames, hasThemeName, removeThemeName, removeThemeNames, setThemeName, setThemeName
Methods inherited from interface com.storedobject.vaadin.HasThemeStyle
addTheme, asPrimary, asSmall, clearThemes, getInternalElement, removeTheme, setTheme
Methods inherited from interface com.vaadin.flow.component.shared.HasThemeVariant
addThemeVariants, removeThemeVariants
Methods inherited from interface com.vaadin.flow.component.shared.HasTooltip
getTooltip, setTooltipText
Methods inherited from interface com.vaadin.flow.component.shared.HasValidationProperties
getErrorMessage, isInvalid, setErrorMessage, setInvalid
Methods inherited from interface com.vaadin.flow.data.binder.HasValidator
addValidationStatusChangeListener
Methods inherited from interface com.vaadin.flow.component.HasValue
addValueChangeListener, getOptionalValue, getValue, isEmpty
Methods inherited from interface com.vaadin.flow.component.HasValueAndElement
isReadOnly
Methods inherited from interface com.storedobject.ui.ObjectInput
getObject, getSearcher, getValue, setObject, setObjectClass, setValue, setValue
Methods 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, setOrderBy
Methods inherited from interface com.storedobject.ui.ObjectLoader
addDataLoadedListener, clear, getCacheLevel, getEffectiveCondition, getFixedFilter, getLoadFilter, setExtraFilter, setExtraFilter, setFilter, setFilter, setFixedFilter, setFixedFilter, setFixedFilter, setFixedFilter, size, streamAll, streamFiltered
Methods inherited from interface com.storedobject.core.ObjectSetter
accept
Methods inherited from interface com.storedobject.vaadin.SpellCheck
setSpellCheck
Methods 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 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 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 empty location name is passed and the parameter allowEmptyName is true.
-