Package com.storedobject.ui.inventory
Class POBrowser<T extends InventoryPO>
java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.grid.Grid<T>
com.storedobject.vaadin.DataGrid<T>
com.storedobject.vaadin.ListGrid<T>
com.storedobject.ui.DataGrid<T>
com.storedobject.ui.ObjectListGrid<T>
com.storedobject.ui.ObjectGrid<T>
com.storedobject.ui.ObjectBrowser<T>
com.storedobject.ui.inventory.POBrowser<T>
- All Implemented Interfaces:
Executable
,Reentrant
,FilterMethods<T>
,HasLogic
,ObjectLoader<T>
,ObjectSearcher<T>
,ObjectSetter<T>
,ObjectsSetter<T>
,EditableDataGrid<T>
,ProducesGRN
,ObjectEditorListener
,ObjectEditorProvider
,ObjectGridData<T,
,T> ObjectLoader<T>
,Transactional
,ViewFilterSupport<T>
,ClickHandler
,ExecutableView
,HasColumns<T>
,SupportWindowMode
,ValueChangeHandler
,com.vaadin.flow.component.AttachNotifier
,com.vaadin.flow.component.BlurNotifier<com.vaadin.flow.component.grid.Grid<T>>
,com.vaadin.flow.component.ComponentEventListener<com.vaadin.flow.component.ClickEvent<? extends com.vaadin.flow.component.Component>>
,com.vaadin.flow.component.DetachNotifier
,com.vaadin.flow.component.Focusable<com.vaadin.flow.component.grid.Grid<T>>
,com.vaadin.flow.component.FocusNotifier<com.vaadin.flow.component.grid.Grid<T>>
,com.vaadin.flow.component.HasElement
,com.vaadin.flow.component.HasEnabled
,com.vaadin.flow.component.HasSize
,com.vaadin.flow.component.HasStyle
,com.vaadin.flow.component.HasTheme
,com.vaadin.flow.component.HasValue.ValueChangeListener
,com.vaadin.flow.data.event.SortEvent.SortNotifier<com.vaadin.flow.component.grid.Grid<T>,
,com.vaadin.flow.component.grid.GridSortOrder<T>> com.vaadin.flow.data.provider.HasDataGenerators<T>
,com.vaadin.flow.data.provider.HasDataView<T,
,Void, com.vaadin.flow.component.grid.dataview.GridDataView<T>> com.vaadin.flow.data.provider.HasLazyDataView<T,
,Void, com.vaadin.flow.component.grid.dataview.GridLazyDataView<T>> com.vaadin.flow.data.provider.HasListDataView<T,
,com.vaadin.flow.component.grid.dataview.GridListDataView<T>> Serializable
,Iterable<T>
,Runnable
,Collection<T>
,EventListener
,Consumer<T>
,List<T>
,SequencedCollection<T>
public class POBrowser<T extends InventoryPO>
extends ObjectBrowser<T>
implements ObjectEditorProvider, ProducesGRN
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.vaadin.flow.component.grid.Grid
com.vaadin.flow.component.grid.Grid.AbstractGridExtension<T>, com.vaadin.flow.component.grid.Grid.Column<T>, com.vaadin.flow.component.grid.Grid.DataCommunicatorBuilder<T,
U extends com.vaadin.flow.data.provider.ArrayUpdater>, com.vaadin.flow.component.grid.Grid.MultiSortPriority, com.vaadin.flow.component.grid.Grid.NestedNullBehavior, com.vaadin.flow.component.grid.Grid.SelectionMode, com.vaadin.flow.component.grid.Grid.UpdateQueue 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.storedobject.vaadin.ClickHandler
ClickHandler.ModifiedClickEvent<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.storedobject.vaadin.HasColumns
HasColumns.SOGrid<T>
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
protected void
Add a process button that will be added to the process context menu.protected void
This method will be invoked if the "Cancel" button is pressed on the anchor form.protected void
This method is invoked when anchor values are set via the anchor form and if any exception is thrown from this method, anchor values will be asked again.protected boolean
canApprovePO
(T po) Check whether this PO can be approved or not.protected boolean
canClosePO
(T po) Check whether this PO can be closed now or not.boolean
Check whether an item can be deleted or not.boolean
Check whether an item can be edited or not.protected boolean
canForeclosePO
(T po) Check whether this PO can be foreclosed now or not.protected boolean
canPlaceOrder
(T po) Check whether this PO can be placed now or not.protected boolean
canProcessGRN
(T po) protected boolean
canReceiveItems
(T po) Check whether items can be received from this PO or not.boolean
void
Create extra header rows if required here by invokingHasColumns.prependHeader()
orHasColumns.appendHeader()
(typically useful for creating column grouping etc.).void
Get the current "ORDER BY" clause.void
loaded()
This method will be invoked whenever data is loaded.void
setAllowSwitchStore
(boolean allowSwitchStore) void
void
setStore
(InventoryStore store) Set a store so that it will not be selectable anymore.void
setStore
(InventoryStore store, boolean allowSwitchStore) Methods inherited from class com.storedobject.ui.ObjectBrowser
actionAllowed, anchorFieldsCreated, canAdd, cancelRowEdit, canRowEdit, clicked, close, constructObjectEditor, create, create, create, create, create, create, create, createEditor, createExtraButtons, createHeader, createObjectEditor, doAdd, doEdit, doView, editRow, executeAnchorForm, extraInfoCreated, extraInfoLoaded, filterActions, getEditingItem, getLogic, getObjectEditor, getRowEditor, getSearchBuilder, getViewComponent, isColumnEditable, isReadOnly, isSearchMode, listMoreButtons, load, load, postLedger, resetAnchor, rowDoubleClicked, saveEditedRow, savingExtraInfo, selected, setCaption, setLogic, setObjectEditor, setReadOnly, setSplitView, streamEditableFields, validateAnchorValues
Methods inherited from class com.storedobject.ui.ObjectGrid
search, setObjectSetter
Methods inherited from class com.storedobject.ui.ObjectListGrid
addObjectChangedListener, configure, createListDataProvider, doDeleteAction, doInsertAction, doUndeleteAction, doUpdateAction, getApplication, getDataProvider, getDelegatedLoader, isValid, load, load, removeObjectChangedListener, setProcessor, setViewFilter
Methods inherited from class com.storedobject.ui.DataGrid
append, canAllowAction, doAppendAction, doReloadAction, doReloadAllAction, getActionPrefix, getObjectClass, itemAppended, itemDeleted, itemInserted, itemReloaded, itemUndeleted, itemUpdated, load, selected, setItems, setItems, setItems, setItems, setItems, setItems, setItems, setItems, sort, sort, validateAppend, validateDelete, validateInsert, validateReload, validateUndelete, validateUpdate
Methods inherited from class com.storedobject.vaadin.ListGrid
add, add, addAll, addAll, addViewFilter, clear, clearViewFilters, contains, containsAll, get, getData, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, onAttach, onDetach, remove, remove, removeAll, removeIf, replaceAll, retainAll, set, setData, size, subList, toArray, toArray
Methods inherited from class com.storedobject.vaadin.DataGrid
addConstructedListener, appendFooter, clearConstructedListeners, getColumnByKey, getColumns, getSOGrid, isColumnReorderingAllowed, setColumnReorderingAllowed, streamConstructedListeners
Methods inherited from class com.vaadin.flow.component.grid.Grid
addCellFocusListener, addColumn, addColumn, addColumn, addColumn, addColumn, addColumn, addColumn, addColumnReorderListener, addColumnResizeListener, addColumns, addComponentColumn, addContextMenu, addDataGenerator, addDragEndListener, addDragStartListener, addDropListener, addFirstHeaderRow, addItemClickListener, addItemDoubleClickListener, addSelectionListener, addSortListener, addThemeVariants, addValueProvider, appendFooterRow, appendHeaderRow, asMultiSelect, asSingleSelect, compareMaybeComparables, configureBeanType, createColumn, createColumnId, createDefaultArrayUpdater, createSortingComparator, deselect, deselectAll, getAriaLabel, getArrayUpdater, getBeanType, getClassNameGenerator, getColumnLayers, getColumnRendering, getDataCommunicator, getDefaultColumnFactory, getDefaultHeaderRow, getDragFilter, getDropFilter, getDropMode, getEditor, getEmptyStateComponent, getEmptyStateText, getFooterRows, getGenericDataView, getHeaderRows, getLazyDataView, getListDataView, getNestedNullBehavior, getPageSize, getPartNameGenerator, getPropertySet, getSelectedItems, getSelectionMode, getSelectionModel, getSelectionPreservationMode, getSortOrder, getUniqueKeyProperty, getUniqueKeyProvider, initConnector, insertColumnLayer, isAllRowsVisible, isDetailsVisible, isDetailsVisibleOnClick, isMultiSort, isRowsDraggable, onDataProviderChange, onEnabledStateChanged, prependFooterRow, prependHeaderRow, recalculateColumnWidths, removeAllColumns, removeAllFooterRows, removeAllHeaderRows, removeColumn, removeColumnByKey, removeColumnLayer, removeColumns, removeFooterRow, removeHeaderRow, removeThemeVariants, scrollToEnd, scrollToIndex, scrollToItem, scrollToStart, select, setAllRowsVisible, setAriaLabel, setClassNameGenerator, setColumnKey, setColumnOrder, setColumnOrder, setColumnRendering, setColumns, setDataProvider, setDefaultMultiSortPriority, setDetailsVisible, setDetailsVisibleOnClick, setDragDataGenerator, setDragFilter, setDropFilter, setDropMode, setEmptyStateComponent, setEmptyStateText, setItemDetailsRenderer, setItemSelectableProvider, setMultiSort, setMultiSort, setMultiSort, setMultiSort, setNestedNullBehavior, setPageSize, setPartNameGenerator, setRowsDraggable, setSelectionDragDetails, setSelectionMode, setSelectionModel, setSelectionPreservationMode, setSortableColumns, setTooltipGenerator, setUniqueKeyProperty, setUniqueKeyProvider, updateSelectionModeOnClient
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, 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.vaadin.flow.component.AttachNotifier
addAttachListener
Methods inherited from interface com.vaadin.flow.component.BlurNotifier
addBlurListener
Methods inherited from interface com.storedobject.vaadin.ClickHandler
clicked, doubleClicked, onComponentEvent, rightClicked
Methods inherited from interface java.util.Collection
parallelStream, stream, toArray
Methods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListener
Methods inherited from interface com.storedobject.ui.EditableDataGrid
canPostLedger, canViewLedger
Methods inherited from interface com.storedobject.common.Executable
act
Methods inherited from interface com.storedobject.vaadin.ExecutableView
abort, clean, createMenuItem, error, execute, execute, getMenuIconName, getMenuItem, getView, invoke, isCloseable, isFullScreen, isHomeView, log, log, message, returnedFrom, run, setClickable, speak, trackValueChange, tray, valueChanged, warning
Methods inherited from interface com.storedobject.core.FilterMethods
getFilterCondition, setFilter, setFilter, setFilter, setFilter, setFilter, setFilter, setLoadFilter, setLoadFilter, setViewFilter, setViewFilter
Methods inherited from interface com.vaadin.flow.component.Focusable
addFocusShortcut, blur, focus, getTabIndex, setTabIndex
Methods inherited from interface com.vaadin.flow.component.FocusNotifier
addFocusListener
Methods inherited from interface com.storedobject.vaadin.HasColumns
addConstructedListener, addItemSelectedListener, addItemsSelectedListener, appendFooter, appendHeader, clearAlerts, clearConstructedListeners, compact, configure, constructed, createColumn, createColumn, createColumn, createColumn, createColumn, createComponentColumn, createDecoratedWindow, createFooters, createHierarchyColumn, createHTMLColumn, createHTMLHierarchyColumn, createView, customizeColumn, customizeRenderer, deselect, deselect, executing, getApplication, getCaption, getColumn, getColumnCaption, getColumnCount, getColumnDetail, getColumnFunction, getColumnHeaderComponent, getColumnMethodName, getColumnNames, getColumnOrder, getColumnSorter, getColumnTemplate, getConfigureButton, getDataClass, getDefinedColumnCount, getFixedColumnWidth, getMenuItem, getObjectRendered, getObjectUnwrapped, getRelativeColumnWidth, getSelected, getSOGrid, getTextAlign, getView, ignoreCaseForColumnSorting, includeColumn, isColumnFrozen, isColumnResizable, isColumnSortable, isColumnVisible, prependFooter, prependHeader, refresh, refresh, refresh, removeItemSelectedListener, render, select, select, setColumnFrozen, setColumnResizable, setColumnVisible, setMethodHandlerHost, sort, sort, sortOrder, sortOrder, streamConstructedListeners, unwrap
Methods inherited from interface com.vaadin.flow.component.HasElement
getElement
Methods inherited from interface com.vaadin.flow.component.HasEnabled
isEnabled, setEnabled
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 java.util.List
addFirst, addLast, equals, getFirst, getLast, hashCode, removeFirst, removeLast, reversed, spliterator
Methods inherited from interface com.storedobject.ui.ObjectEditorListener
editingCancelled, editingEnded, editingStarted
Methods inherited from interface com.storedobject.ui.ObjectEditorProvider
createEditor
Methods inherited from interface com.storedobject.ui.ObjectGridData
convert, createSearchBuilder, deselect, deselectAll, doLoad, getEntityFilter, getItem, getLoadFilter, getObjectClass, getObjectCount, getSelectionModel, isAllowAny, populate, populate, populate, resetSearch, scrollTo, search, search, search, select, setLoadFilter, setObject, setObjectConsumer, setObjectConsumer, setObjects, setSelectionMode, validateFilterCondition
Methods inherited from interface com.storedobject.core.ObjectLoader
applyFilter, canContain, clear, getAllowAny, getLinkType, getMaster, getObjectClass, isAllowAny, load, load, load, load, load, load, load, load, load, load, load, load, load, load, load, load, load, load, load, load, reload, setLinkType, setLinkType, setMaster, setMaster, setOrderBy, setOrderBy
Methods inherited from interface com.storedobject.ui.ObjectLoader
addDataLoadedListener, applyFilterPredicate, clear, get, getCacheLevel, getDelegatedLoader, getEffectiveCondition, getFixedFilter, getLoadFilter, getObjectCount, indexOf, load, setExtraFilter, setExtraFilter, setFilter, setFilter, setFixedFilter, setFixedFilter, setFixedFilter, setFixedFilter, size, streamAll, streamFiltered
Methods inherited from interface com.storedobject.core.ObjectSetter
accept, setObject
Methods inherited from interface com.storedobject.ui.inventory.ProducesGRN
canFinalize, extraGRNInfoCreated, extraGRNInfoLoaded, savingGRNExtraInfo, statusOfGRNChanged
Methods inherited from interface com.storedobject.common.Reentrant
isReentrant
Methods inherited from interface com.storedobject.vaadin.util.SupportWindowMode
createWindow
Methods inherited from interface com.storedobject.ui.Transactional
commit, execute, getTransactionManager, run, transact, transact, transactControl, transactControl
Methods inherited from interface com.storedobject.vaadin.ValueChangeHandler
valueChanged
Methods inherited from interface com.storedobject.ui.util.ViewFilterSupport
configure, configure, configureMatch, filterView, getViewFilter
-
Field Details
-
switchStore
-
goToGRNs
-
-
Constructor Details
-
POBrowser
-
POBrowser
-
POBrowser
-
POBrowser
-
POBrowser
-
POBrowser
-
POBrowser
-
POBrowser
-
POBrowser
-
POBrowser
-
-
Method Details
-
loaded
public void loaded()Description copied from class:ObjectListGrid
This method will be invoked whenever data is loaded.- Overrides:
loaded
in classObjectListGrid<T extends InventoryPO>
-
canSearch
public boolean canSearch()- Specified by:
canSearch
in interfaceObjectGridData<T extends InventoryPO,
T extends InventoryPO>
-
setForGRNs
public void setForGRNs() -
getOrderBy
Description copied from interface:ObjectLoader
Get the current "ORDER BY" clause.- Specified by:
getOrderBy
in interfaceObjectLoader<T extends InventoryPO>
- Returns:
- Current "ORDER BY" clause.
-
addExtraButtons
protected void addExtraButtons()- Overrides:
addExtraButtons
in classObjectBrowser<T extends InventoryPO>
-
createHeaders
public void createHeaders()Description copied from interface:HasColumns
Create extra header rows if required here by invokingHasColumns.prependHeader()
orHasColumns.appendHeader()
(typically useful for creating column grouping etc.). Default implementation does nothing. This is invoked beforeHasColumns.createHeader()
.- Specified by:
createHeaders
in interfaceHasColumns<T extends InventoryPO>
-
setAllowSwitchStore
public void setAllowSwitchStore(boolean allowSwitchStore) -
setStore
Set a store so that it will not be selectable anymore.- Parameters:
store
- Store to set.
-
setStore
-
anchorsSet
protected void anchorsSet()Description copied from class:ObjectBrowser
This method is invoked when anchor values are set via the anchor form and if any exception is thrown from this method, anchor values will be asked again.- Overrides:
anchorsSet
in classObjectBrowser<T extends InventoryPO>
-
anchorsCancelled
protected void anchorsCancelled()Description copied from class:ObjectBrowser
This method will be invoked if the "Cancel" button is pressed on the anchor form.- Overrides:
anchorsCancelled
in classObjectBrowser<T extends InventoryPO>
-
canEdit
Description copied from interface:EditableDataGrid
Check whether an item can be edited or not. (This control will be applied only for user interaction).- Specified by:
canEdit
in interfaceEditableDataGrid<T extends InventoryPO>
- Parameters:
po
- Item.- Returns:
- True/false.
-
canDelete
Description copied from interface:EditableDataGrid
Check whether an item can be deleted or not. (This control will be applied only for user interaction).- Specified by:
canDelete
in interfaceEditableDataGrid<T extends InventoryPO>
- Parameters:
po
- Item to delete.- Returns:
- True/false.
-
doDelete
- Overrides:
doDelete
in classObjectBrowser<T extends InventoryPO>
-
canPlaceOrder
Check whether this PO can be placed now or not.- Parameters:
po
- PO.- Returns:
- True/false.
-
canReceiveItems
Check whether items can be received from this PO or not.- Parameters:
po
- PO.- Returns:
- True/false.
-
canApprovePO
Check whether this PO can be approved or not.- Parameters:
po
- PO.- Returns:
- True/false.
-
canClosePO
Check whether this PO can be closed now or not.- Parameters:
po
- PO.- Returns:
- True/false.
-
canForeclosePO
Check whether this PO can be foreclosed now or not.- Parameters:
po
- PO.- Returns:
- True/false.
-
canProcessGRN
-
addProcessButton
-