Package com.storedobject.ui
Class DetailLinkGrid<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.AbstractEditableGrid<T>
com.storedobject.ui.EditableObjectGrid<T>
com.storedobject.ui.AbstractLinkGrid<T>
com.storedobject.ui.DetailLinkGrid<T>
- All Implemented Interfaces:
Executable,Reentrant,FilterMethods<T>,HasLogic,ObjectLoader<T>,ObjectSearcher<T>,ObjectSetter<T>,ObjectsSetter<T>,EditableDataGrid<T>,LinkGrid<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>
- 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.SpringData, 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> -
Constructor Summary
ConstructorsConstructorDescriptionDetailLinkGrid(ObjectLinkField<T> linkField) DetailLinkGrid(ObjectLinkField<T> linkField, boolean createContextMenu) DetailLinkGrid(ObjectLinkField<T> linkField, Iterable<String> columns) DetailLinkGrid(ObjectLinkField<T> linkField, Iterable<String> columns, boolean createContextMenu) -
Method Summary
Modifier and TypeMethodDescriptionvoidadd()booleanvoidCancel the editing if it is active.protected final booleanInvoked to check whether a change is allowed from the client side or not.booleanCheck whether an item can be deleted or not.voidclear()This method doesn't clear the items.protected final EditableList<T> voidCreate extra header rows if required here by invokingHasColumns.prependHeader()orHasColumns.appendHeader()(typically useful for creating column grouping etc.).voiddelete()voidedit()protected com.vaadin.flow.component.HasValue<?, ?> getColumnField(String columnName) Get the field for the column.getLink()booleanisColumnEditable(String columnName) All fields are editable by default unless a field for editing the value of a particular column can not be determined from itsObjectEditor.booleanvoidreload()Reload all entries.voidselected()Get the currently selected instance.final voidsetObjectEditor(ObjectEditor<T> editor) voidsetReadOnly(boolean readOnly) Set read only.Methods inherited from class com.storedobject.ui.AbstractLinkGrid
applyFilter, constructObjectEditor, createObjectEditor, createView, getField, getItem, getMaster, getName, getSelected, getType, getView, getView, isDetail, isEnabled, reloadedAllNow, setMaster, setOrderByMethods inherited from class com.storedobject.ui.EditableObjectGrid
addAll, addAll, addObjectChangedListener, addValueChangeTracker, append, createListDataProvider, customizeObjectEditor, deletedNow, doDeleteAction, doInsertAction, doReloadAction, doReloadAllAction, doUndeleteAction, doUpdateAction, editItem, getDelegatedLoader, getEditingItem, getField, getObjectEditor, getRowEditor, insertedNow, isReadOnly, isValid, reloadedNow, removeObjectChangedListener, saveEdited, setAutoSaveOnMove, setObjectSetter, setViewFilter, streamEditableFields, undeletedNow, updatedNow, validateDataMethods inherited from class com.storedobject.ui.AbstractEditableGrid
changed, createEditor, customizeColumn, delete, getColumnOrder, getEditableList, isAdded, isColumnSortable, isDeleted, isEdited, isFromClient, isSavePending, reload, setEditOnSingleClick, setFromClient, streamAdded, streamAll, streamDeleted, streamEdited, updateMethods inherited from class com.storedobject.ui.DataGrid
actionAllowed, canAllowAction, doAppendAction, getActionPrefix, getDataProvider, getObjectClass, itemAppended, itemDeleted, itemInserted, itemReloaded, itemUndeleted, itemUpdated, load, load, selected, setItems, setItems, setItems, setItems, setItems, setItems, setItems, setItems, sort, sort, validateAppend, validateDelete, validateInsert, validateReload, validateUndelete, validateUpdateMethods inherited from class com.storedobject.vaadin.ListGrid
add, addViewFilter, clearViewFilters, contains, containsAll, get, getData, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, onAttach, onDetach, remove, remove, removeAll, removeIf, replaceAll, retainAll, set, setData, size, subList, toArray, toArrayMethods inherited from class com.storedobject.vaadin.DataGrid
addConstructedListener, appendFooter, clearConstructedListeners, getColumnByKey, getColumns, getSOGrid, isColumnReorderingAllowed, setColumnReorderingAllowed, streamConstructedListenersMethods 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, getColumnByInternalId, 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, getTooltipPosition, 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, setItemsPageable, setItemsPageable, setMultiSort, setMultiSort, setMultiSort, setMultiSort, setNestedNullBehavior, setPageSize, setPartNameGenerator, setRowsDraggable, setSelectionDragDetails, setSelectionMode, setSelectionModel, setSelectionPreservationMode, setSortableColumns, setTooltipGenerator, setTooltipPosition, setUniqueKeyProperty, setUniqueKeyProvider, updateSelectionModeOnClientMethods 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, setVisibleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.flow.component.AttachNotifier
addAttachListenerMethods inherited from interface com.vaadin.flow.component.BlurNotifier
addBlurListenerMethods inherited from interface com.storedobject.vaadin.ClickHandler
clicked, doubleClicked, onComponentEvent, rightClickedMethods inherited from interface java.util.Collection
parallelStream, stream, toArrayMethods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListenerMethods inherited from interface com.storedobject.ui.EditableDataGrid
canEdit, canPostLedger, canViewLedgerMethods inherited from interface com.storedobject.common.Executable
actMethods inherited from interface com.storedobject.vaadin.ExecutableView
abort, clean, clicked, close, createMenuItem, error, execute, execute, getMenuIconName, getMenuItem, invoke, isCloseable, isFullScreen, isHomeView, log, log, message, returnedFrom, run, setClickable, speak, trackValueChange, tray, valueChanged, warningMethods inherited from interface com.storedobject.core.FilterMethods
getFilterCondition, setFilter, setFilter, setFilter, setFilter, setFilter, setFilter, setLoadFilter, setLoadFilter, setViewFilterMethods inherited from interface com.vaadin.flow.component.Focusable
addFocusShortcut, blur, focus, getTabIndex, setTabIndexMethods inherited from interface com.vaadin.flow.component.FocusNotifier
addFocusListenerMethods 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, createHeader, createHierarchyColumn, createHTMLColumn, createHTMLHierarchyColumn, 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, getRenderedColumnNames, getSOGrid, getTextAlign, getViewComponent, ignoreCaseForColumnSorting, includeColumn, isColumnFrozen, isColumnResizable, isColumnSortable, isColumnVisible, prependFooter, prependHeader, refresh, refresh, refresh, removeItemSelectedListener, render, select, select, setCaption, setColumnFrozen, setColumnResizable, setColumnVisible, setMethodHandlerHost, sort, sort, sortOrder, sortOrder, streamConstructedListeners, unwrapMethods inherited from interface com.vaadin.flow.component.HasElement
getElementMethods inherited from interface com.vaadin.flow.component.HasEnabled
setEnabledMethods 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, setWidthFullMethods inherited from interface com.vaadin.flow.component.HasStyle
addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassNameMethods inherited from interface com.vaadin.flow.component.HasTheme
addThemeName, addThemeNames, getThemeName, getThemeNames, hasThemeName, removeThemeName, removeThemeNames, setThemeName, setThemeNameMethods inherited from interface com.storedobject.ui.LinkGrid
getObjectClass, getObjectEditor, getOldValue, isAllowAdd, isAllowDelete, isAllowEdit, isAllowReload, isAllowReloadAll, isReadOnly, itemAppended, itemDeleted, itemInserted, itemReloaded, itemUndeleted, itemUpdated, select, setAllowAdd, setAllowDelete, setAllowEdit, setAllowReload, setAllowReloadAll, setMasterView, setValue, size, viewMethods inherited from interface java.util.List
addFirst, addLast, equals, getFirst, getLast, hashCode, removeFirst, removeLast, reversed, spliteratorMethods inherited from interface com.storedobject.ui.ObjectEditorListener
editingCancelled, editingEnded, editingStartedMethods inherited from interface com.storedobject.ui.ObjectGridData
canSearch, convert, createSearchBuilder, deselect, deselectAll, doLoad, getEntityFilter, getLoadFilter, getObjectClass, getObjectCount, getSearchBuilder, getSelectionModel, isAllowAny, isSearchMode, populate, populate, populate, resetSearch, scrollTo, search, search, search, select, setLoadFilter, setObject, setObjectConsumer, setObjectConsumer, setObjects, setSelectionMode, validateFilterConditionMethods inherited from interface com.storedobject.core.ObjectLoader
canContain, getAllowAny, getLinkType, 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, setOrderByMethods inherited from interface com.storedobject.ui.ObjectLoader
addDataLoadedListener, applyFilterPredicate, clear, get, getCacheLevel, getEffectiveCondition, getFixedFilter, indexOf, load, setExtraFilter, setExtraFilter, setFilter, setFilter, setFixedFilter, setFixedFilter, setFixedFilter, setFixedFilter, size, streamAll, streamFilteredMethods inherited from interface com.storedobject.core.ObjectSetter
accept, setObjectMethods inherited from interface com.storedobject.common.Reentrant
isReentrantMethods inherited from interface com.storedobject.vaadin.util.SupportWindowMode
createWindowMethods inherited from interface com.storedobject.ui.Transactional
commit, execute, getLogic, getTransactionManager, run, setLogic, transact, transact, transactControl, transactControl, transactControl, transactControlMethods inherited from interface com.storedobject.vaadin.ValueChangeHandler
valueChangedMethods inherited from interface com.storedobject.ui.util.ViewFilterSupport
configure, configure, configure, configureMatch, filterView, getViewFilter
-
Constructor Details
-
DetailLinkGrid
-
DetailLinkGrid
-
DetailLinkGrid
-
DetailLinkGrid
public DetailLinkGrid(ObjectLinkField<T> linkField, Iterable<String> columns, boolean createContextMenu)
-
-
Method Details
-
createHeaders
public void createHeaders()Description copied from interface:HasColumnsCreate extra header rows if required here by invokingHasColumns.prependHeader()orHasColumns.appendHeader()(typically useful for creating column grouping etc.). The default implementation does nothing. This is invoked beforeHasColumns.createHeader(). -
getColumnField
Description copied from class:EditableObjectGridGet the field for the column. (Used while editing the row). In general, it is not required to override this. If this method returnsnull, field will be created from the respective Object Editor.- Overrides:
getColumnFieldin classEditableObjectGrid<T extends StoredObject>- Parameters:
columnName- Column name for which field needs to be obtained.- Returns:
- Default implementation returns
null.
-
createEditableList
- Overrides:
createEditableListin classAbstractEditableGrid<T extends StoredObject>
-
canDelete
Description copied from interface:EditableDataGridCheck whether an item can be deleted or not. (This control will be applied only for user interaction).- Parameters:
item- Item to delete.- Returns:
- True/false.
-
add
- Specified by:
addin interfaceCollection<T extends StoredObject>- Specified by:
addin interfaceList<T extends StoredObject>- Overrides:
addin classEditableObjectGrid<T extends StoredObject>
-
add
public void add() -
edit
public void edit() -
delete
public void delete() -
reload
public void reload()Description copied from interface:ObjectLoaderReload all entries.- Specified by:
reloadin interfaceLinkGrid<T extends StoredObject>- Specified by:
reloadin interfaceObjectLoader<T extends StoredObject>- Overrides:
reloadin classAbstractLinkGrid<T extends StoredObject>
-
reloadAll
public void reloadAll()- Specified by:
reloadAllin interfaceLinkGrid<T extends StoredObject>- Overrides:
reloadAllin classAbstractEditableGrid<T extends StoredObject>
-
setObjectEditor
-
getButtonPanel
-
getLink
-
setReadOnly
public void setReadOnly(boolean readOnly) Description copied from class:EditableObjectGridSet read only.- Specified by:
setReadOnlyin interfaceLinkGrid<T extends StoredObject>- Overrides:
setReadOnlyin classEditableObjectGrid<T extends StoredObject>- Parameters:
readOnly- If true, rows will not be editable.
-
isColumnEditable
Description copied from class:EditableObjectGridAll fields are editable by default unless a field for editing the value of a particular column can not be determined from itsObjectEditor.- Specified by:
isColumnEditablein interfaceEditableDataGrid<T extends StoredObject>- Overrides:
isColumnEditablein classEditableObjectGrid<T extends StoredObject>- Parameters:
columnName- Column name.- Returns:
- True/false.
-
clear
public void clear()Description copied from class:AbstractEditableGridThis method doesn't clear the items. Instead, it just invokes theAbstractEditableGrid.fireChanged(Object, int)method withnullas the item value andEditorAction.ALLas the "change action". Subclasses should implement the real "clear" functionality.- Specified by:
clearin interfaceCollection<T extends StoredObject>- Specified by:
clearin interfaceLinkGrid<T extends StoredObject>- Specified by:
clearin interfaceList<T extends StoredObject>- Specified by:
clearin interfaceObjectLoader<T extends StoredObject>- Overrides:
clearin classEditableObjectGrid<T extends StoredObject>
-
cancelEdit
public void cancelEdit()Description copied from class:AbstractEditableGridCancel the editing if it is active.- Overrides:
cancelEditin classEditableObjectGrid<T extends StoredObject>
-
selected
Description copied from class:DataGridGet the currently selected instance. If nothing is selected, a warning message is displayed andnullis returned. (If you simply want to a find the selected instance without displaying a warning message, you may useHasColumns.getSelected()).- Specified by:
selectedin interfaceLinkGrid<T extends StoredObject>- Overrides:
selectedin classDataGrid<T extends StoredObject>- Returns:
- Selected instance or
null.
-
isInvalid
public boolean isInvalid() -
getLinkGrid
-
canChange
Description copied from class:EditableObjectGridInvoked to check whether a change is allowed from the client side or not.- Overrides:
canChangein classEditableObjectGrid<T extends StoredObject>- Parameters:
item- Item to change.editorAction- Editor action (One of the static values fromEditorAction).- Returns:
- True if change is acceptable. If returned false, change will be ignored.
-