Package com.vaadin.flow.component.crud
Class CrudGrid<E>
java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.grid.Grid<E>
com.vaadin.flow.component.crud.CrudGrid<E>
- Type Parameters:
E
- the bean type
- All Implemented Interfaces:
AttachNotifier
,BlurNotifier<Grid<E>>
,DetachNotifier
,Focusable<Grid<E>>
,FocusNotifier<Grid<E>>
,HasElement
,HasEnabled
,HasSize
,HasStyle
,HasTheme
,SortEvent.SortNotifier<Grid<E>,
,GridSortOrder<E>> HasDataGenerators<E>
,HasDataView<E,
,Void, GridDataView<E>> HasLazyDataView<E,
,Void, GridLazyDataView<E>> HasListDataView<E,
,GridListDataView<E>> Serializable
A simple grid implementation for Crud that allows searching and sorting
backed by a data provider.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.vaadin.flow.component.grid.Grid
Grid.AbstractGridExtension<T>, Grid.Column<T>, Grid.DataCommunicatorBuilder<T,
U extends ArrayUpdater>, Grid.MultiSortPriority, Grid.NestedNullBehavior, Grid.SelectionMode, Grid.UpdateQueue Nested classes/interfaces inherited from interface com.vaadin.flow.component.BlurNotifier
BlurNotifier.BlurEvent<C extends Component>
Nested classes/interfaces inherited from interface com.vaadin.flow.component.FocusNotifier
FocusNotifier.FocusEvent<C extends Component>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionDataProvider<E,
?> Gets the data provider set to the grid.Gets the filter applied to this gridvoid
setDataProvider
(DataProvider<E, ?> dataProvider) Sets a DataProvider<E, CrudFilter>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, createEditor, createSortingComparator, deselect, deselectAll, getArrayUpdater, getBeanType, getClassNameGenerator, getColumnByKey, getColumnLayers, getColumnRendering, getColumns, 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, isColumnReorderingAllowed, isDetailsVisible, isDetailsVisibleOnClick, isMultiSort, isRowsDraggable, onAttach, onDataProviderChange, onDetach, onEnabledStateChanged, prependFooterRow, prependHeaderRow, recalculateColumnWidths, removeAllColumns, removeAllFooterRows, removeAllHeaderRows, removeColumn, removeColumnByKey, removeColumnLayer, removeColumns, removeFooterRow, removeHeaderRow, removeThemeVariants, scrollToEnd, scrollToIndex, scrollToItem, scrollToStart, select, setAllRowsVisible, setClassNameGenerator, setColumnKey, setColumnOrder, setColumnOrder, setColumnRendering, setColumnReorderingAllowed, setColumns, setDefaultMultiSortPriority, setDetailsVisible, setDetailsVisibleOnClick, setDragDataGenerator, setDragFilter, setDropFilter, setDropMode, setEmptyStateComponent, setEmptyStateText, setItemDetailsRenderer, setItems, setItems, setItems, setItems, setMultiSort, setMultiSort, setMultiSort, setMultiSort, setNestedNullBehavior, setPageSize, setPartNameGenerator, setRowsDraggable, setSelectionDragDetails, setSelectionMode, setSelectionModel, setSelectionPreservationMode, setSortableColumns, setTooltipGenerator, setUniqueKeyProperty, setUniqueKeyProvider, sort, 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.vaadin.flow.component.DetachNotifier
addDetachListener
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.vaadin.flow.component.HasElement
getElement
Methods inherited from interface com.vaadin.flow.component.HasEnabled
isEnabled, setEnabled
Methods inherited from interface com.vaadin.flow.data.provider.HasLazyDataView
setItems, setItems
Methods inherited from interface com.vaadin.flow.data.provider.HasListDataView
setItems, setItems
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
-
Constructor Details
-
CrudGrid
Instantiates a new CrudGrid for the supplied bean type.- Parameters:
beanType
- the bean typeenableDefaultFilters
- true to enable filtering or false to disable
-
-
Method Details
-
getFilter
Gets the filter applied to this grid- Returns:
- the filter
-
getDataProvider
Gets the data provider set to the grid.- Overrides:
getDataProvider
in classGrid<E>
- Returns:
- the data provider of this grid, not
null
-
setDataProvider
Sets a DataProvider<E, CrudFilter>- Overrides:
setDataProvider
in classGrid<E>
- Parameters:
dataProvider
- aDataProvider
- Throws:
IllegalArgumentException
- if the supplied data provider is not a DataProvider<E, CrudFilter>- See Also:
-