Package com.storedobject.ui.inventory
Interface ItemInput<T extends InventoryItem>
- Type Parameters:
T- Type of objects that can be inputted.
- All Superinterfaces:
AbstractObjectInput<T>,Consumer<T>,FilterMethods<T>,HasElement,com.vaadin.flow.component.HasElement,com.vaadin.flow.component.HasLabel,com.vaadin.flow.component.HasPlaceholder,HasThemeStyle,ObjectGetter<T>,ObjectInput<T>,ObjectProvider<T>,ObjectSetter<T>,Serializable,ValueRequired
- All Known Implementing Classes:
AssemblyItemField,ItemComboField,ItemField,ItemGetField
Fields that can input a given type of
InventoryItem value.- Author:
- Syam
-
Method Summary
Modifier and TypeMethodDescriptionstatic <I extends InventoryItem>
ItemInput<I> A helper method to create an instance of theItemInputfield based on the properties of the item's class.static <I extends InventoryItem>
ItemInput<I> A helper method to create an instance of theItemInputfield based on the properties of the item's class.static <I extends InventoryItem>
ItemInput<I> A helper method to create an instance of theItemInputfield based on the properties of the item's class.static <I extends InventoryItem>
ItemInput<I> A helper method to create an instance of theItemInputfield based on the properties of the item's class.voidfixPartNumber(InventoryItemType partNumber) Fix the part number (an instance ofInventoryItemType).ObjectProvider<? extends InventoryItemType> Get the P/N provider of this.voidsetExtraFilterProvider(FilterProvider extraFilterProvider) Set extra filters that need to be added to other filters when item's accessibility is checked.voidsetLocation(InventoryLocation location) Set the location (it could be bin location or any other location).voidsetLocation(ObjectProvider<? extends InventoryLocation> locationField) Set the location (it could be bin location or any other location).voidsetStore(InventoryStore store) Set the store.voidsetStore(ObjectProvider<? extends InventoryStore> storeField) Set the store.Methods inherited from interface com.storedobject.ui.util.AbstractObjectInput
applyFilterPredicate, clear, convert, focus, getCached, getDetailComponent, getDisplayDetail, getObject, getObjectClass, getObjectId, getObjectId, isAllowAny, setCached, setDetailComponent, setDisplayDetail, setEnabled, setItemLabelGenerator, setObject, setPrefixFieldControl, setReadOnlyMethods inherited from interface com.storedobject.core.FilterMethods
applyFilter, getEffectiveCondition, getFilterCondition, getLoadFilter, setFilter, setFilter, setFilter, setFilter, setFilter, setFilter, setLoadFilter, setLoadFilter, setViewFilter, setViewFilterMethods 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.HasLabel
getLabel, setLabelMethods inherited from interface com.vaadin.flow.component.HasPlaceholder
getPlaceholder, setPlaceholderMethods inherited from interface com.storedobject.vaadin.HasThemeStyle
addTheme, asPrimary, asSmall, clearThemes, getInternalElement, removeTheme, setThemeMethods inherited from interface com.storedobject.ui.ObjectInput
getInternalLabel, getObject, getSearcher, getValue, load, reload, setInternalLabel, setObject, setObjectClass, setValue, setValueMethods inherited from interface com.storedobject.core.ObjectSetter
acceptMethods inherited from interface com.storedobject.vaadin.ValueRequired
isRequired, setRequired
-
Method Details
-
setStore
Set the store. If set, only items from the given store will be acceptable.- Parameters:
storeField- Any provider that can supply anInventoryStoreinstance.
-
setStore
Set the store. If set, only items from the given store will be acceptable.- Parameters:
store- An instance ofInventoryStore.
-
setLocation
Set the location (it could be bin location or any other location). If set, only items from the given location will be acceptable.- Parameters:
locationField- Any provider that can supply anInventoryLocationinstance.
-
setLocation
Set the location (it could be bin location or any other location). If set, only items from the given location will be acceptable.- Parameters:
location- An instance of anInventoryLocation.
-
fixPartNumber
Fix the part number (an instance ofInventoryItemType). If a non-null value is set, the "part number" portion will be locked with that value. Anullvalue may be set later to unlock it.- Parameters:
partNumber- Part number to set.
-
setExtraFilterProvider
Set extra filters that need to be added to other filters when item's accessibility is checked.- Parameters:
extraFilterProvider- Extra filter to be set.
-
getPartNumberProvider
ObjectProvider<? extends InventoryItemType> getPartNumberProvider()Get the P/N provider of this.- Returns:
- P/N provider.
-
create
-
create
-
create
-
create
static <I extends InventoryItem> ItemInput<I> create(String label, Class<I> objectClass, boolean allowAny) A helper method to create an instance of theItemInputfield based on the properties of the item's class.- Type Parameters:
I- Type of the item class.- Parameters:
label- Label for the field.objectClass- Class of the item.allowAny- Whether to allow subclasses or not.- Returns:
- Instance of an
ItemInput.
-