Package com.storedobject.ui
Class ObjectBrowser<T extends StoredObject>
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>
- All Implemented Interfaces:
Executable
,Reentrant
,FilterMethods<T>
,HasLogic
,ObjectLoader<T>
,ObjectSearcher<T>
,ObjectSetter<T>
,ObjectsSetter<T>
,EditableDataGrid<T>
,ObjectEditorListener
,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>
- Direct Known Subclasses:
AbstractInvoiceBrowser
,AbstractRequestMaterial
,AbstractSendAndReceiveMaterial
,ApproveTransaction
,CrossServerManager
,GRN
,JournalVoucherBrowser
,ManageBiometric
,ObjectBrowserEditor
,ObjectBrowserViewer
,ObjectSearchBrowser
,PackingUnitBrowser
,POBrowser
,POItemBrowser
,RestrictedSystemUserBrowser
,SystemUserGroupBrowser
,TextContentBrowser
,UnitDefinitionBrowser
public class ObjectBrowser<T extends StoredObject>
extends ObjectGrid<T>
implements EditableDataGrid<T>, ObjectEditorListener
- 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
FieldsModifier and TypeFieldDescriptionprotected Button
protected Button
protected final ButtonLayout
protected Button
protected Button
protected Button
protected Button
protected Button
protected Button
protected Button
protected Button
protected PrintButton
protected Button
protected Button
protected Button
protected Button
-
Constructor Summary
ConstructorsModifierConstructorDescriptionObjectBrowser
(Class<T> objectClass) ObjectBrowser
(Class<T> objectClass, int actions) ObjectBrowser
(Class<T> objectClass, int actions, SearchBuilder<T> searchBuilder) ObjectBrowser
(Class<T> objectClass, int actions, String caption) ObjectBrowser
(Class<T> objectClass, Iterable<String> browseColumns) ObjectBrowser
(Class<T> objectClass, Iterable<String> browseColumns, int actions) ObjectBrowser
(Class<T> objectClass, Iterable<String> browseColumns, int actions, SearchBuilder<T> searchBuilder) ObjectBrowser
(Class<T> objectClass, Iterable<String> browseColumns, int actions, SearchBuilder<T> searchBuilder, String caption) protected
ObjectBrowser
(Class<T> objectClass, Iterable<String> browseColumns, int actions, SearchBuilder<T> searchBuilder, String caption, String allowedActions) ObjectBrowser
(Class<T> objectClass, Iterable<String> browseColumns, int actions, Iterable<String> filterColumns) ObjectBrowser
(Class<T> objectClass, Iterable<String> browseColumns, int actions, Iterable<String> filterColumns, String caption) protected
ObjectBrowser
(Class<T> objectClass, Iterable<String> browseColumns, int actions, Iterable<String> filterColumns, String caption, String allowedActions) ObjectBrowser
(Class<T> objectClass, Iterable<String> browseColumns, SearchBuilder<T> searchBuilder) ObjectBrowser
(Class<T> objectClass, String caption) ObjectBrowser
(String className) -
Method Summary
Modifier and TypeMethodDescriptionboolean
actionAllowed
(String action) Check whether a specific action is allowed or not.protected void
void
This method is invoked when anchor fields are created for the first time.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
canAdd()
void
boolean
canRowEdit
(T item) void
clicked
(com.vaadin.flow.component.Component c) Default implementation, does nothing.void
close()
Close this.protected ObjectEditor
<T> static <O extends StoredObject>
ObjectBrowser<O> static <O extends StoredObject>
ObjectBrowser<O> static <O extends StoredObject>
ObjectBrowser<O> static <O extends StoredObject>
ObjectBrowser<O> static <O extends StoredObject>
ObjectBrowser<O> create
(Class<O> objectClass, Iterable<String> browseColumns, int actions, Iterable<String> filterColumns) static <O extends StoredObject>
ObjectBrowser<O> create
(Class<O> objectClass, Iterable<String> browseColumns, int actions, Iterable<String> filterColumns, String title) static <O extends StoredObject>
ObjectBrowser<O> protected final com.vaadin.flow.component.grid.editor.Editor
<T> protected void
com.vaadin.flow.component.Component
You can have a "header row" (as the first row) that covers the whole grid.protected ObjectEditor
<T> void
doAdd()
void
void
void
void
void
executeAnchorForm
(Runnable action) Execute the "anchor form" and run some specified action.void
extraInfoCreated
(T object, StoredObject extraInfo) This is invoked when an "Extra Information" instance is created.void
extraInfoLoaded
(T object, StoredObject extraInfo) This is invoked when an existing "Extra Information" instance is loaded for the current object.protected int
filterActions
(int actions) final T
final Logic
getLogic()
Get the logic.final ObjectEditor
<T> final ObjectEditor
<T> com.vaadin.flow.component.Component
Get the component for creating the view - SeeHasColumns.getView(boolean)
andExecutableView.getView()
.boolean
isColumnEditable
(String columnName) Whether a given column is editable or not.final boolean
boolean
protected List
<com.vaadin.flow.component.Component> List of more buttons to be added to thePrintButton
, in addition to the configured buttons.void
load
(int linkType, StoredObject master, String condition, String orderedBy, boolean any) Load the links of the given "master" instance.void
Load the instances.void
postLedger
(T object) void
Reset the anchor values so that it will be asked again for the next add/search actions.void
rowDoubleClicked
(T object) void
void
savingExtraInfo
(T object, StoredObject extraInfo) This is invoked when an existing "Extra Information" instance is being saved.selected()
Get the currently selected instance.void
setCaption
(String caption) Set caption used when displaying the grid in a View.final void
Set the logic.void
setObjectEditor
(ObjectEditor<T> editor) void
setReadOnly
(boolean readOnly) void
Stream
<com.vaadin.flow.component.HasValue<?, ?>> Get the stream of editable fields of this grid.void
validateAnchorValues
(T object) Validate the anchor values.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, loaded, 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
canDelete, canEdit, 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, createHeaders, 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.ObjectGridData
canSearch, 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, getOrderBy, 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.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
-
buttonPanel
-
print
-
add
-
edit
-
delete
-
search
-
filter
-
load
-
view
-
report
-
excel
-
audit
-
exit
-
save
-
cancel
-
ledger
-
-
Constructor Details
-
ObjectBrowser
-
ObjectBrowser
-
ObjectBrowser
-
ObjectBrowser
-
ObjectBrowser
-
ObjectBrowser
-
ObjectBrowser
-
ObjectBrowser
-
ObjectBrowser
-
ObjectBrowser
-
ObjectBrowser
-
ObjectBrowser
-
ObjectBrowser
-
ObjectBrowser
-
ObjectBrowser
-
ObjectBrowser
-
ObjectBrowser
-
-
Method Details
-
create
-
create
-
create
public static <O extends StoredObject> ObjectBrowser<O> create(Class<O> objectClass, Iterable<String> browseColumns, int actions) -
create
public static <O extends StoredObject> ObjectBrowser<O> create(Class<O> objectClass, Iterable<String> browseColumns, int actions, Iterable<String> filterColumns) -
create
public static <O extends StoredObject> ObjectBrowser<O> create(Class<O> objectClass, int actions, String title) -
create
public static <O extends StoredObject> ObjectBrowser<O> create(Class<O> objectClass, Iterable<String> browseColumns, int actions, String title) -
create
public static <O extends StoredObject> ObjectBrowser<O> create(Class<O> objectClass, Iterable<String> browseColumns, int actions, Iterable<String> filterColumns, String title) -
setLogic
Description copied from interface:HasLogic
Set the logic. This will be invoked by theApplicationServer
when theLogic
is executed.- Specified by:
setLogic
in interfaceHasLogic
- Specified by:
setLogic
in interfaceTransactional
- Parameters:
logic
- Logic to set
-
getLogic
-
setCaption
Description copied from interface:HasColumns
Set caption used when displaying the grid in a View.- Specified by:
setCaption
in interfaceExecutableView
- Specified by:
setCaption
in interfaceHasColumns<T extends StoredObject>
- Parameters:
caption
- Caption
-
createHeader
public com.vaadin.flow.component.Component createHeader()Description copied from interface:HasColumns
You can have a "header row" (as the first row) that covers the whole grid. Typically, such a row is to show your own buttons or components to customize the grid. The default implementation returns null and thus, no such row is created. (Please note thatHasColumns.createHeaders()
} is invoked before this method for adding other header rows just above the main header row. This may be used for column grouping etc.)- Specified by:
createHeader
in interfaceHasColumns<T extends StoredObject>
- Returns:
- Component to be used as the "header row".
-
filterActions
protected int filterActions(int actions) -
createExtraButtons
protected void createExtraButtons() -
addExtraButtons
protected void addExtraButtons() -
listMoreButtons
List of more buttons to be added to thePrintButton
, in addition to the configured buttons.- Returns:
- List of more buttons to be added. The list could contain any type of components.
-
canAdd
protected boolean canAdd() -
close
public void close()Description copied from interface:ExecutableView
Close this.- Specified by:
close
in interfaceExecutableView
-
selected
Description copied from class:DataGrid
Get the currently selected instance. If nothing is selected, a warning message is displayed andnull
is returned. (If you simply want to a find the selected instance without displaying a warning message, you may useHasColumns.getSelected()
).- Overrides:
selected
in classDataGrid<T extends StoredObject>
- Returns:
- Selected instance or
null
.
-
rowDoubleClicked
-
clicked
public void clicked(com.vaadin.flow.component.Component c) Description copied from interface:ExecutableView
Default implementation, does nothing.- Specified by:
clicked
in interfaceClickHandler
- Specified by:
clicked
in interfaceExecutableView
- Parameters:
c
- Component
-
load
public void load(int linkType, StoredObject master, String condition, String orderedBy, boolean any) Description copied from interface:ObjectLoader
Load the links of the given "master" instance. Current "load filter" if set will be applied.- Specified by:
load
in interfaceObjectLoader<T extends StoredObject>
- Parameters:
linkType
- Link type.master
- Master instance.condition
- Filtering condition to be applied.orderedBy
- "ORDER BY" clause to use while loading.any
- Whether instanced of the subclasses to be retrieved or not.
-
load
Description copied from interface:ObjectLoader
Load the instances. Current "load filter" if set will be applied. If "master" is already set, "links" of the "master" will be loaded.- Specified by:
load
in interfaceObjectLoader<T extends StoredObject>
- Parameters:
condition
- Filtering condition to be applied.orderedBy
- "ORDER BY" clause to use while loading.any
- Whether instanced of the subclasses to be retrieved or not.
-
validateAnchorValues
Validate the anchor values. This is invoked when anchor values are set while adding a new instance.- Parameters:
object
- The instance that contains the currently accepted anchor values.- Throws:
SOException
- If thrown, the message is displayed as a warning and the add operation is aborted.
-
anchorFieldsCreated
public void anchorFieldsCreated()This method is invoked when anchor fields are created for the first time. -
resetAnchor
public void resetAnchor()Reset the anchor values so that it will be asked again for the next add/search actions. -
anchorsSet
-
anchorsCancelled
protected void anchorsCancelled()This method will be invoked if the "Cancel" button is pressed on the anchor form. -
executeAnchorForm
Execute the "anchor form" and run some specified action.- Parameters:
action
- Action to run.
-
doAdd
public void doAdd() -
doEdit
-
doDelete
-
postLedger
-
doView
-
getViewComponent
public com.vaadin.flow.component.Component getViewComponent()Description copied from interface:HasColumns
Get the component for creating the view - SeeHasColumns.getView(boolean)
andExecutableView.getView()
.- Specified by:
getViewComponent
in interfaceHasColumns<T extends StoredObject>
- Returns:
- The component for the view. By default, the grid itself is returned.
-
setSplitView
public void setSplitView() -
getRowEditor
-
setObjectEditor
-
getObjectEditor
-
createObjectEditor
-
constructObjectEditor
-
isColumnEditable
Description copied from interface:EditableDataGrid
Whether a given column is editable or not. A field will be created for editing the value only if this method returns true for a particular column.- Specified by:
isColumnEditable
in interfaceEditableDataGrid<T extends StoredObject>
- Parameters:
columnName
- Column name.- Returns:
- True/false.
-
streamEditableFields
Description copied from interface:EditableDataGrid
Get the stream of editable fields of this grid.- Specified by:
streamEditableFields
in interfaceEditableDataGrid<T extends StoredObject>
- Returns:
- Stream of editable fields.
-
isSearchMode
public boolean isSearchMode()- Specified by:
isSearchMode
in interfaceObjectGridData<T extends StoredObject,
T extends StoredObject>
-
getSearchBuilder
- Specified by:
getSearchBuilder
in interfaceObjectGridData<T extends StoredObject,
T extends StoredObject> - Specified by:
getSearchBuilder
in interfaceObjectSearcher<T extends StoredObject>
-
setReadOnly
public void setReadOnly(boolean readOnly) -
isReadOnly
public final boolean isReadOnly() -
createEditor
- Overrides:
createEditor
in classcom.vaadin.flow.component.grid.Grid<T extends StoredObject>
-
editRow
-
canRowEdit
-
cancelRowEdit
public void cancelRowEdit() -
saveEditedRow
public void saveEditedRow() -
getEditingItem
-
extraInfoCreated
This is invoked when an "Extra Information" instance is created. At this point, you may set your own values if required.- Parameters:
object
- The object instance for which the "Extra Information" is created.extraInfo
- Newly created "Extra Information" instance.
-
extraInfoLoaded
This is invoked when an existing "Extra Information" instance is loaded for the current object. At this point, you may set your own values if required.- Parameters:
object
- The object instance for which the "Extra Information" is loaded.extraInfo
- The "Extra Information" instance loaded now.
-
savingExtraInfo
This is invoked when an existing "Extra Information" instance is being saved. At this point, you may set your own values if required. (ObjectEditor.validateData()
andStoredObject.validateData(TransactionManager)
are be invoked after this).If an exception is thrown from this method, the save process will not happen.
- Parameters:
object
- The object instance for which the "Extra Information" is getting saved.extraInfo
- The "Extra Information" instance to be saved.- Throws:
Exception
- if any validation error to be notified.
-
actionAllowed
Description copied from class:DataGrid
Check whether a specific action is allowed or not. An action is defined in the UI logic as a keyword like "SEND-ITEMS", "PLACE-ORDER", "RECEIVE-ITEMS", "PRINT-VOUCHER", etc. and there could be corresponding access control applicable within the logic. The user's groups determine whether that user can carry out that action or not. This method returnstrue/false
to denote that the user can carry out the action or not. However, it is up to the logic to decide the course of action.The user's groups can be configured to allow various UI actions (
UIAction
. EachUIAction
represents a unique "action" string (UIAction.getAction()
) and that value should be equal toDataGrid.getActionPrefix()
+ "-" + action in order to allow that action.- Overrides:
actionAllowed
in classDataGrid<T extends StoredObject>
- Parameters:
action
- Action string.- Returns:
- True/false. Please note that it will always return
true
ifDataGrid.getActionPrefix()
returnsnull
.
-