Package com.storedobject.ui.inventory
Class ItemGetField<I extends InventoryItem>
java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.AbstractField<com.vaadin.flow.component.customfield.CustomField<I>,I>
com.vaadin.flow.component.customfield.CustomField<I>
com.storedobject.vaadin.CustomField<I>
com.storedobject.ui.AbstractObjectField<I>
com.storedobject.ui.ObjectGetField<I>
com.storedobject.ui.inventory.ItemGetField<I>
- Type Parameters:
I
- Type of inventory item to accept.
- All Implemented Interfaces:
FilterMethods<I>
,ObjectGetter<I>
,ObjectSetter<I>
,ItemInput<I>
,ObjectInput<I>
,ObjectProvider<I>
,AbstractObjectInput<I>
,HasElement
,HasThemeStyle
,ValueRequired
,com.vaadin.flow.component.AttachNotifier
,com.vaadin.flow.component.BlurNotifier<com.vaadin.flow.component.customfield.CustomField<I>>
,com.vaadin.flow.component.DetachNotifier
,com.vaadin.flow.component.Focusable<com.vaadin.flow.component.customfield.CustomField<I>>
,com.vaadin.flow.component.FocusNotifier<com.vaadin.flow.component.customfield.CustomField<I>>
,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.customfield.CustomField<I>,
,I>, I> com.vaadin.flow.component.HasValueAndElement<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<com.vaadin.flow.component.customfield.CustomField<I>,
,I>, I> 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.customfield.CustomField<I>,
,I>, I> Serializable
,Consumer<I>
public class ItemGetField<I extends InventoryItem>
extends ObjectGetField<I>
implements ItemInput<I>
Field to accept an instance of the
InventoryItem
from direct search words.- Author:
- Syam
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.storedobject.ui.ObjectGetField
ObjectGetField.GetProvider<O extends StoredObject>, ObjectGetField.GetSupplier<O extends StoredObject>, ObjectGetField.GetTypedSupplier<O extends StoredObject>
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.HasValue
com.vaadin.flow.component.HasValue.ValueChangeEvent<V>, com.vaadin.flow.component.HasValue.ValueChangeListener<E extends com.vaadin.flow.component.HasValue.ValueChangeEvent<?>>
-
Constructor Summary
ConstructorsConstructorDescriptionItemGetField
(Class<I> objectClass) Constructor.ItemGetField
(Class<I> objectClass, boolean allowAny) Constructor.ItemGetField
(String label, Class<I> objectClass) Constructor.ItemGetField
(String label, Class<I> objectClass, boolean allowAny) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected ObjectBrowser
<I> Get the searcher for this field.ObjectProvider
<? extends InventoryItemType> Get the P/N provider of this.void
setExtraFilterProvider
(FilterProvider extraFilterProvider) Set extra filters that need to be added to other filters when item's accessibility is checked.void
setLocation
(InventoryLocation location) Set the location (it could be bin location or any other location).void
setLocation
(ObjectProvider<? extends InventoryLocation> locationField) Set the location (it could be bin location or any other location).void
setStore
(InventoryStore store) Set the store.void
setStore
(ObjectProvider<? extends InventoryStore> storeField) Set the store.Methods inherited from class com.storedobject.ui.ObjectGetField
canCreate, createGetProvider, createPrefixComponent, doSearch, doSearchLoadAll, focus, generateModelValue, getSearchField, setNotFoundHandler, setNotFoundTacker, setPlaceholder, setPresentationValue
Methods inherited from class com.storedobject.ui.AbstractObjectField
applyFilter, createDefaultSearcher, editor, filter, filteredList, getBrowseColumns, getCached, getContent, getDetailComponent, getDisplayDetail, getInternalLabel, getLoadFilter, getObjectClass, getPrefixComponent, getSearchColumns, getSearcher, initComponent, isAllowAny, isInvalid, isRequired, load, onAttach, reget, reload, setBrowseColumns, setCached, setDetailComponent, setDisplayDetail, setEnabled, setInternalLabel, setItemLabelGenerator, setPrefixFieldControl, setReadOnly, setRequired, setSearchColumns
Methods inherited from class com.storedobject.vaadin.CustomField
addField, addField
Methods inherited from class com.vaadin.flow.component.customfield.CustomField
add, addThemeVariants, getLabel, remove, removeThemeVariants, setLabel, updateValue
Methods inherited from class com.vaadin.flow.component.AbstractField
addValueChangeListener, getEmptyValue, getValue, isEmpty, setModelValue, setValue, 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, onDetach, 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
applyFilterPredicate, convert, focus, getCached, getDetailComponent, getDisplayDetail, getObject, getObjectClass, getObjectId, getObjectId, isAllowAny, setCached, setDetailComponent, setDisplayDetail, setEnabled, setItemLabelGenerator, setObject, setPrefixFieldControl, setReadOnly
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
applyFilter, getEffectiveCondition, getFilterCondition, getLoadFilter, setFilter, 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.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.HasPlaceholder
getPlaceholder, setPlaceholder
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.HasTooltip
getTooltip, setTooltipText
Methods inherited from interface com.vaadin.flow.component.HasValidation
setManualValidation
Methods inherited from interface com.vaadin.flow.component.shared.HasValidationProperties
getErrorMessage, setErrorMessage, setInvalid
Methods inherited from interface com.vaadin.flow.component.HasValue
addValueChangeListener, clear, getEmptyValue, getOptionalValue, getValue, isEmpty, setValue
Methods inherited from interface com.vaadin.flow.component.HasValueAndElement
isReadOnly, isRequiredIndicatorVisible, setRequiredIndicatorVisible
Methods inherited from interface com.storedobject.ui.ObjectInput
getInternalLabel, getObject, getSearcher, getValue, load, reload, setInternalLabel, setObject, setObjectClass, setValue, setValue
Methods inherited from interface com.storedobject.core.ObjectSetter
accept
Methods inherited from interface com.storedobject.vaadin.ValueRequired
isRequired, setRequired
-
Constructor Details
-
ItemGetField
Constructor.- Parameters:
objectClass
- Class of theInventoryItem
objects that are valid.
-
ItemGetField
Constructor.- Parameters:
label
- Label for the field.objectClass
- Class of theInventoryItem
objects that are valid.
-
ItemGetField
Constructor.- Parameters:
objectClass
- Class of theInventoryItem
objects that are valid.allowAny
- Whether subclasses should be allowed or not.
-
ItemGetField
Constructor.- Parameters:
label
- Label for the field.objectClass
- Class of theInventoryItem
objects that are valid.allowAny
- Whether subclasses should be allowed or not.
-
-
Method Details
-
setStore
Description copied from interface:ItemInput
Set the store. If set, only items from the given store will be acceptable.- Specified by:
setStore
in interfaceItemInput<I extends InventoryItem>
- Parameters:
storeField
- Any provider that can supply anInventoryStore
instance.
-
setStore
Description copied from interface:ItemInput
Set the store. If set, only items from the given store will be acceptable.- Specified by:
setStore
in interfaceItemInput<I extends InventoryItem>
- Parameters:
store
- An instance ofInventoryStore
.
-
setLocation
Description copied from interface:ItemInput
Set the location (it could be bin location or any other location). If set, only items from the given location will be acceptable.- Specified by:
setLocation
in interfaceItemInput<I extends InventoryItem>
- Parameters:
locationField
- Any provider that can supply anInventoryLocation
instance.
-
setLocation
Description copied from interface:ItemInput
Set the location (it could be bin location or any other location). If set, only items from the given location will be acceptable.- Specified by:
setLocation
in interfaceItemInput<I extends InventoryItem>
- Parameters:
location
- An instance of anInventoryLocation
.
-
setExtraFilterProvider
Description copied from interface:ItemInput
Set extra filters that need to be added to other filters when item's accessibility is checked.- Specified by:
setExtraFilterProvider
in interfaceItemInput<I extends InventoryItem>
- Parameters:
extraFilterProvider
- Extra filter to be set.
-
getPartNumberProvider
Description copied from interface:ItemInput
Get the P/N provider of this.- Specified by:
getPartNumberProvider
in interfaceItemInput<I extends InventoryItem>
- Returns:
- P/N provider.
-
createSearcher
Description copied from class:AbstractObjectField
Get the searcher for this field.- Overrides:
createSearcher
in classAbstractObjectField<I extends InventoryItem>
- Returns:
- Typically, an instance of the
ObjectBrowser
that has search capability.
-