Class PagingGrid<T>
- java.lang.Object
-
- com.vaadin.flow.component.Component
-
- com.vaadin.flow.component.grid.Grid<T>
-
- org.vaadin.firitin.components.grid.VGrid<T>
-
- org.vaadin.firitin.components.grid.PagingGrid<T>
-
- Type Parameters:
T- the the of row shown in the grid
- All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier,com.vaadin.flow.component.BlurNotifier<com.vaadin.flow.component.grid.Grid<T>>,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.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,FluentAttachNotifier<VGrid<T>>,FluentBlurNotifier<com.vaadin.flow.component.grid.Grid<T>,VGrid<T>>,FluentComponent<VGrid<T>>,FluentDetachNotifier<VGrid<T>>,FluentFocusable<com.vaadin.flow.component.grid.Grid<T>,VGrid<T>>,FluentFocusNotifier<com.vaadin.flow.component.grid.Grid<T>,VGrid<T>>,FluentHasSize<VGrid<T>>,FluentHasStyle<VGrid<T>>,FluentHasTheme<VGrid<T>>
public class PagingGrid<T> extends VGrid<T>
A Grid which uses "traditional" paging, instead of the lazy loading while scrolling commonly used in Vaadin apps.- Author:
- mstahv
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfacePagingGrid.PagingDataProvider<T>-
Nested classes/interfaces inherited from class com.vaadin.flow.component.grid.Grid
com.vaadin.flow.component.grid.Grid.AbstractGridExtension<T extends Object>, com.vaadin.flow.component.grid.Grid.Column<T extends Object>, com.vaadin.flow.component.grid.Grid.DataCommunicatorBuilder<T extends Object,U extends com.vaadin.flow.data.provider.ArrayUpdater>, com.vaadin.flow.component.grid.Grid.NestedNullBehavior, com.vaadin.flow.component.grid.Grid.SelectionMode, com.vaadin.flow.component.grid.Grid.UpdateQueue
-
-
Constructor Summary
Constructors Constructor Description PagingGrid()PagingGrid(int pageSize)PagingGrid(Class<T> beanType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PagingGrid.PagingDataProvider<T>getPagingDataProvider()voidsetPagingDataProvider(PagingGrid.PagingDataProvider<T> provider)Defines the way how data is fetched from the backend.voidsetTotalResults(long totalResults)This method can optionally be used to define the size of the whole data set on all pages.-
Methods inherited from class org.vaadin.firitin.components.grid.VGrid
setDataProvider, withItems, withItems, withItems, withProperties, withSelectionMode, withSelectionModel, withThemeVariants
-
Methods inherited from class com.vaadin.flow.component.grid.Grid
addCellFocusListener, addColumn, addColumn, 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, getColumns, getDataCommunicator, getDataProvider, getDefaultColumnFactory, getDefaultHeaderRow, getDragFilter, getDropFilter, getDropMode, getEditor, getFooterRows, getGenericDataView, getHeaderRows, getLazyDataView, getListDataView, getNestedNullBehavior, getPageSize, getPropertySet, getSelectedItems, getSelectionModel, getSortOrder, getUniqueKeyProperty, getUniqueKeyProvider, initConnector, insertColumnLayer, isAllRowsVisible, isColumnReorderingAllowed, isDetailsVisible, isDetailsVisibleOnClick, isHeightByRows, isMultiSort, isRowsDraggable, isVerticalScrollingEnabled, onAttach, onDataProviderChange, onDetach, onEnabledStateChanged, prependFooterRow, prependHeaderRow, recalculateColumnWidths, removeAllColumns, removeColumn, removeColumnByKey, removeColumnLayer, removeColumns, removeThemeVariants, scrollToEnd, scrollToIndex, scrollToStart, select, setAllRowsVisible, setClassNameGenerator, setColumnKey, setColumnOrder, setColumnOrder, setColumnReorderingAllowed, setColumns, setDataProvider, setDetailsVisible, setDetailsVisibleOnClick, setDragDataGenerator, setDragFilter, setDropFilter, setDropMode, setHeightByRows, setItemDetailsRenderer, setItems, setItems, setItems, setItems, setItems, setMultiSort, setNestedNullBehavior, setPageSize, setRowsDraggable, setSelectionDragDetails, setSelectionMode, setSelectionModel, setSortableColumns, setUniqueKeyProperty, setUniqueKeyProvider, setVerticalScrollingEnabled, sort, updateSelectionModeOnClient
-
Methods inherited from class com.vaadin.flow.component.Component
addListener, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getLocale, getParent, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, 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 org.vaadin.firitin.fluency.ui.FluentAttachNotifier
withAttachListener
-
Methods inherited from interface org.vaadin.firitin.fluency.ui.FluentBlurNotifier
withBlurListener
-
Methods inherited from interface org.vaadin.firitin.fluency.ui.FluentComponent
setId, setVisible, withId, withVisible
-
Methods inherited from interface org.vaadin.firitin.fluency.ui.FluentDetachNotifier
withDetachListener
-
Methods inherited from interface org.vaadin.firitin.fluency.ui.FluentFocusable
withTabIndex
-
Methods inherited from interface org.vaadin.firitin.fluency.ui.FluentFocusNotifier
withFocusListener
-
Methods inherited from interface org.vaadin.firitin.fluency.ui.FluentHasSize
withFullHeight, withFullWidth, withHeight, withMaxHeight, withMaxSize, withMaxWidth, withMinHeight, withMinSize, withMinWidth, withSize, withSizeFull, withSizeUndefined, withWidth
-
Methods inherited from interface org.vaadin.firitin.fluency.ui.FluentHasStyle
withAddedClassName, withClassName, withStyle
-
Methods inherited from interface org.vaadin.firitin.fluency.ui.FluentHasTheme
withThemeNames
-
Methods inherited from interface com.vaadin.flow.component.Focusable
addFocusShortcut, blur, focus, getTabIndex, setTabIndex
-
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
-
-
-
-
Method Detail
-
getPagingDataProvider
public PagingGrid.PagingDataProvider<T> getPagingDataProvider()
-
setPagingDataProvider
public void setPagingDataProvider(PagingGrid.PagingDataProvider<T> provider)
Defines the way how data is fetched from the backend. To define the page length, useGrid.setPageSize(int)method.- Parameters:
provider- the data provider that fetches data from the backend by pages.
-
setTotalResults
public void setTotalResults(long totalResults)
This method can optionally be used to define the size of the whole data set on all pages. If size is defined, the pagination bar shows "jump to last page" button and the status bar can report how many pages of results there are in total.- Parameters:
totalResults- the amount of results
-
-