T - Item typeP - Item property typeL - Item listing typeC - Concrete configurator typepublic interface ItemListingConfigurator<T,P,L extends ItemListing<T,P>,C extends ItemListingConfigurator<T,P,L,C>> extends ComponentConfigurator<C>, HasSizeConfigurator<C>, HasStyleConfigurator<C>, HasEnabledConfigurator<C>, FocusableConfigurator<com.vaadin.flow.component.Component,C>, HasThemeVariantConfigurator<com.vaadin.flow.component.grid.GridVariant,C>, InputGroupConfigurator<P,T,ItemListing.EditorComponentGroup<P,T>,C>
ItemListing configurator.| Modifier and Type | Interface and Description |
|---|---|
static interface |
ItemListingConfigurator.BaseItemListingColumnConfigurator<C extends ItemListingConfigurator.BaseItemListingColumnConfigurator<C>>
Base ItemListing column configurator.
|
static class |
ItemListingConfigurator.ColumnAlignment
Enumeration of column text alignments.
|
static interface |
ItemListingConfigurator.ColumnConfigurator
Listing column configurator to be used in a column post processor.
|
static interface |
ItemListingConfigurator.ColumnPostProcessor<P>
A post processor which can be used to furtherly configure a listing column
before adding it to the listing component.
|
static interface |
ItemListingConfigurator.EditableItemListingRow<P>
An editable
ItemListing section row handler. |
static interface |
ItemListingConfigurator.EditableItemListingSection<P>
ItemListing section handler for header and footer configuration. |
static interface |
ItemListingConfigurator.ItemListingColumnBuilder<T,P,L extends ItemListing<T,P>,B extends ItemListingConfigurator<T,P,L,B>>
ItemListing column builder.
|
static interface |
ItemListingConfigurator.ItemListingColumnConfigurator<T,P,C extends ItemListingConfigurator.ItemListingColumnConfigurator<T,P,C>>
ItemListing column configurator.
|
static interface |
ItemListingConfigurator.ItemListingContextMenuBuilder<T,P,L extends ItemListing<T,P>,B extends ItemListingConfigurator<T,P,L,B>>
ItemListing context menu builder. |
ComponentConfigurator.BaseComponentConfiguratorHasSizeConfigurator.BaseHasSizeConfiguratorHasStyleConfigurator.BaseHasStyleConfiguratorHasEnabledConfigurator.BaseHasEnabledConfiguratorInputGroupConfigurator.BeanInputGroupConfigurator<T,G extends BoundComponentGroup<String,Input<?>>,C extends InputGroupConfigurator.BeanInputGroupConfigurator<T,G,C>>, InputGroupConfigurator.PropertySetInputGroupConfigurator<G extends BoundComponentGroup<com.holonplatform.core.property.Property<?>,Input<?>>,C extends InputGroupConfigurator.PropertySetInputGroupConfigurator<G,C>>FULL_SIZE| Modifier and Type | Method and Description |
|---|---|
C |
alignment(P property,
ItemListingConfigurator.ColumnAlignment alignment)
Sets the text alignment for the column which corresponds to given property.
|
default C |
autoWidth(P property)
Enables automatic width for the column which corresponds to given property.
|
C |
autoWidth(P property,
boolean autoWidth)
Enables or disables automatic width for the column which corresponds to given
property.
|
C |
columnReorderingAllowed(boolean columnReorderingAllowed)
Sets whether column reordering is allowed or not.
|
C |
columnsAutoWidth()
Enables automatic width for all the listing columns.
|
default <R extends com.vaadin.flow.component.Component> |
componentRenderer(P property,
Function<T,R> renderer)
Render the column which corresponds to given property as a
Component,
using given function to provide the component for each listing item. |
ItemListingConfigurator.ItemListingContextMenuBuilder<T,P,L,C> |
contextMenu()
Get a
ItemListingConfigurator.ItemListingContextMenuBuilder to configure and add a context
menu to show for each listing item. |
C |
displayAfter(P property,
P afterProperty)
Configure the column represented by given
property id to be
displayed after the column which corresponds to the id specified by the given
afterProperty. |
C |
displayAsFirst(P property)
Configure the column represented by given
property to be
displayed before any other listing column by default. |
C |
displayAsLast(P property)
Configure the column represented by given
property to be
displayed after any other listing column by default. |
C |
displayBefore(P property,
P beforeProperty)
Configure the column represented by given
property id to be
displayed before the column which corresponds to the id specified by the
given beforeProperty. |
C |
dragDataGenerator(String type,
Function<T,String> dragDataGenerator)
Sets a generator function for customizing drag data.
|
C |
dragFilter(Predicate<T> dragFilter)
Sets the drag filter for this drag source.
|
C |
dropFilter(Predicate<T> dropFilter)
Sets the drop filter for this drag target.
|
C |
dropMode(com.vaadin.flow.component.grid.dnd.GridDropMode dropMode)
Sets the drop mode of this drop target.
|
default C |
editable()
Set the listing as editable.
|
C |
editable(boolean editable)
Set whether the listing is editable.
|
C |
editorBuffered(boolean buffered)
Set whether the editor is in buffered mode.
|
default C |
editorComponent(P property,
com.vaadin.flow.component.Component editorComponent)
Set the
Component to display when the column bound to given
property is in editing mode. |
C |
editorComponent(P property,
Function<T,? extends com.vaadin.flow.component.Component> editorComponentProvider)
Set the
Component to display when the column bound to given
property is in editing mode. |
C |
expand(P property)
Expand the column which corresponds to given property, taking all the
available space.
|
C |
flexGrow(P property,
int flexGrow)
Sets the flex grow ratio for the column which corresponds to given property.
|
C |
footer(Consumer<ItemListingConfigurator.EditableItemListingSection<P>> footerConfigurator)
Provide a
Consumer to configure the item listing footer section,
using the ItemListing.ItemListingSection API. |
C |
footer(P property,
com.holonplatform.core.i18n.Localizable footer)
Set the footer text for the column which corresponds to given property.
|
default C |
footer(P property,
String footer)
Set the footer text for the column which corresponds to given property.
|
default C |
footer(P property,
String defaultFooter,
String footerMessageCode)
Set the footer text for the column which corresponds to given property.
|
C |
footerComponent(P property,
com.vaadin.flow.component.Component footer)
Set the
Component to use as footer for the column which corresponds
to given property. |
C |
frozen(boolean frozen)
Set whether the listing is frozen.
|
C |
frozen(P property,
boolean frozen)
Set whether the column which corresponds to given property is frozen.
|
C |
frozenColumns(int frozenColumnsCount)
Sets the number of frozen columns in this listing.
|
C |
header(Consumer<ItemListingConfigurator.EditableItemListingSection<P>> headerConfigurator)
Provide a
Consumer to configure the item listing header section,
using the ItemListing.ItemListingSection API. |
C |
header(P property,
com.holonplatform.core.i18n.Localizable header)
Set the header text for the column which corresponds to given property.
|
default C |
header(P property,
String header)
Set the header text for the column which corresponds to given property.
|
default C |
header(P property,
String defaultHeader,
String headerMessageCode)
Set the header text for the column which corresponds to given property.
|
C |
headerComponent(P property,
com.vaadin.flow.component.Component header)
Set the
Component to use as header for the column which corresponds
to given property. |
C |
heightByRows(boolean heightByRows)
If
true, the listing's height is defined by the number of its
rows. |
default C |
hidden(P property)
Set the column which corresponds to given property as hidden.
|
default C |
itemDetailsComponent(Function<T,com.vaadin.flow.component.Component> componentProvider)
Set the function to use for displaying the item details rows as a
Component. |
C |
itemDetailsRenderer(com.vaadin.flow.data.renderer.Renderer<T> renderer)
Set the renderer to use for displaying the item details rows.
|
default C |
itemDetailsText(Function<T,String> textProvider)
Set the function to use for displaying the item details rows as a text.
|
C |
itemDetailsVisibleOnClick(boolean detailsVisibleOnClick)
Sets whether the item details can be opened and closed by clicking the rows
or not.
|
default C |
multiSelect()
Set the listing selection mode as
Selectable.SelectionMode.MULTI. |
C |
multiSort(boolean multiSort)
Sets whether multiple column sorting is enabled on the client-side.
|
default C |
notSelectable()
Set the listing selection mode as
Selectable.SelectionMode.NONE. |
C |
pageSize(int pageSize)
Sets the page size, which is the number of items fetched at a time from the
data source.
|
C |
readOnly(P property,
boolean readOnly)
Set whether the column which corresponds to given property is read-only.
|
C |
renderer(P property,
com.vaadin.flow.data.renderer.Renderer<T> renderer)
Sets the
Renderer to use for the column which corresponds to given
property. |
C |
resizable(boolean resizable)
Set whether all the item listing columns are user-resizable.
|
C |
resizable(P property,
boolean resizable)
Set whether the column which corresponds to given property is user-resizable.
|
C |
rowsDraggable(boolean rowsDraggable)
Sets whether the user can drag the grid rows or not.
|
C |
selectAllCheckboxVisibility(com.vaadin.flow.component.grid.GridMultiSelectionModel.SelectAllCheckboxVisibility selectAllCheckBoxVisibility)
Sets the select all checkbox visibility mode.
|
C |
selectionMode(Selectable.SelectionMode selectionMode)
Set the listing selection mode.
|
default C |
singleSelect()
Set the listing selection mode as
Selectable.SelectionMode.SINGLE. |
C |
sortable(boolean sortable)
Set whether all the item listing columns are user-sortable.
|
C |
sortable(P property,
boolean sortable)
Set whether the column which corresponds to given property is user-sortable.
|
C |
sortComparator(P property,
Comparator<T> comparator)
Sets comparator to use with in-memory sorting for the column which
corresponds to given property.
|
C |
sortProvider(P property,
Function<com.holonplatform.core.query.QuerySort.SortDirection,Stream<ItemSort<P>>> sortProvider)
Set the function to use to obtain the
ItemSorts to use when the
column which corresponds to given property is user-sorted. |
C |
sortUsing(P property,
List<P> sortProperties)
Set the properties to use to implement the sort logic to apply when the
column which corresponds to given property is user-sorted.
|
default C |
sortUsing(P property,
P... sortProperties)
Set the properties to use to implement the sort logic to apply when the
column which corresponds to given property is user-sorted.
|
C |
styleNameGenerator(Function<T,String> styleNameGenerator)
Sets the function that is used for generating CSS style class names for rows
in this listing.
|
C |
styleNameGenerator(P property,
Function<T,String> styleNameGenerator)
Set the CSS style class name generator to use for the column which
corresponds to given property.
|
C |
valueProvider(P property,
com.vaadin.flow.function.ValueProvider<T,String> valueProvider)
Sets the
ValueProvider to use to obtain the text to display in the
column which corresponds to given property. |
C |
verticalScrollingEnabled(boolean enabled)
Enables or disables the vertical scrolling on the Grid web component.
|
C |
visible(P property,
boolean visible)
Set whether the column which corresponds to given property is visible.
|
C |
visibleColumns(List<? extends P> visibleColumns)
Set the visible columns list, using the item properties as column reference.
|
default C |
visibleColumns(P... visibleColumns)
Set the visible columns list, using the item properties as column reference.
|
C |
width(P property,
String width)
Sets the width of the column which corresponds to given property as a
CSS-string.
|
<X> ItemListingConfigurator.ItemListingColumnBuilder<T,P,L,C> |
withColumn(com.vaadin.flow.function.ValueProvider<T,X> valueProvider)
Add a virtual column which contents will be rendered using given
valueProvider. |
C |
withColumnPostProcessor(ItemListingConfigurator.ColumnPostProcessor<P> columnPostProcessor)
Add a
ItemListingConfigurator.ColumnPostProcessor which can be used to furtherly configure
each listing column before adding it to the listing component. |
C |
withColumnReorderListener(ColumnReorderListener<T,P> listener)
Add listener for column reorder events.
|
C |
withColumnResizeListener(ColumnResizeListener<T,P> listener)
Add listener for column resize events.
|
ItemListingConfigurator.ItemListingColumnBuilder<T,P,L,C> |
withComponentColumn(com.vaadin.flow.function.ValueProvider<T,com.vaadin.flow.component.Component> valueProvider)
Add a column which contents will be rendered as a
Component using
given valueProvider. |
C |
withDragEndListener(ItemListingDnDListener<T,P,ItemListingDragEndEvent<T,P>> listener)
Adds a listing drag end listener.
|
C |
withDragStartListener(ItemListingDnDListener<T,P,ItemListingDragStartEvent<T,P>> listener)
Adds a listing drag start listener.
|
C |
withDropListener(ItemListingDnDListener<T,P,ItemListingDropEvent<T,P>> listener)
Adds a listing drop listener.
|
C |
withEditorCancelListener(ItemListing.EditorCancelListener<T,P> listener)
Adds an item editor listener for editor
cancel events. |
C |
withEditorCloseListener(ItemListing.EditorCloseListener<T,P> listener)
Adds an item editor save listener for editor
close events. |
C |
withEditorOpenListener(ItemListing.EditorOpenListener<T,P> listener)
Adds an item editor save listener for editor
open events. |
C |
withEditorSaveListener(ItemListing.EditorSaveListener<T,P> listener)
Adds an item editor listener for editor
save events. |
C |
withItemClickListener(ClickEventListener<L,ItemClickEvent<L,T>> listener)
Adds a listener that gets notified when user clicks on an item row.
|
C |
withItemRefreshListener(ItemEventListener<L,T,ItemEvent<L,T>> listener)
Adds a listener that gets notified when the item listing data is refreshed.
|
C |
withSelectionListener(Selectable.SelectionListener<T> selectionListener)
Add a
Selectable.SelectionListener to listen to items selection changes. |
create, elementConfiguration, hidden, id, visible, withAttachListener, withDetachListenerwithEventListener, withEventListener, withThemeNamecreate, fullHeight, fullSize, fullWidth, height, height, heightUndefined, maxHeight, maxWidth, minHeight, minWidth, sizeUndefined, width, width, widthUndefinedcreate, styleName, styleNamescreate, disabled, enabledtabIndex, withBlurListener, withFocusListener, withFocusShortcut, withFocusShortcutKeywithThemeVariantsenableRefreshOnValueChange, groupValidationStatusHandler, required, required, required, required, validationStatusHandler, validationStatusHandler, validationStatusLabel, withPostProcessor, withValidatorusePropertyRendererRegistry, withValueChangeListenerC displayAsFirst(P property)
property to be
displayed before any other listing column by default.property - The property which represents the column to display as first
(not null)C displayAsLast(P property)
property to be
displayed after any other listing column by default.property - The property which represents the column to display as last
(not null)C displayBefore(P property, P beforeProperty)
property id to be
displayed before the column which corresponds to the id specified by the
given beforeProperty.property - Property which represents the column to display before
the other property (not null)beforeProperty - Property which represents the column before which the
first property has to be displayed (not null)C displayAfter(P property, P afterProperty)
property id to be
displayed after the column which corresponds to the id specified by the given
afterProperty.property - Property which represents the column to display after
the other property (not null)afterProperty - Property which represents the column after which the
first property has to be displayed (not null)<X> ItemListingConfigurator.ItemListingColumnBuilder<T,P,L,C> withColumn(com.vaadin.flow.function.ValueProvider<T,X> valueProvider)
valueProvider.X - Column value typevalueProvider - The value provider to use to provide the column value,
using the current row item instance (not null)ItemListingConfigurator.ItemListingColumnBuilder which allow further column
configuration and provides the ItemListingConfigurator.ItemListingColumnBuilder.add()
method to add the column to the listingItemListingConfigurator.ItemListingColumnBuilder<T,P,L,C> withComponentColumn(com.vaadin.flow.function.ValueProvider<T,com.vaadin.flow.component.Component> valueProvider)
Component using
given valueProvider.valueProvider - The value provider to use to provide the column
Component using the current row item instance
(not null)ItemListingConfigurator.ItemListingColumnBuilder which allow further column
configuration and provides the ItemListingConfigurator.ItemListingColumnBuilder.add()
method to add the column to the listingdefault C visibleColumns(P... visibleColumns)
Any property display order declaration configured using
displayAsFirst(Object), displayAsLast(Object),
displayBefore(Object, Object) and
displayAfter(Object, Object) will be ignored.
visibleColumns - The visible column properties (not null)C visibleColumns(List<? extends P> visibleColumns)
Any property display order declaration configured using
displayAsFirst(Object), displayAsLast(Object),
displayBefore(Object, Object) and
displayAfter(Object, Object) will be ignored.
visibleColumns - The visible column properties (not null)C sortable(boolean sortable)
sortable - Whether all the item listing columns are user-sortableC sortable(P property, boolean sortable)
property - The property to configure (not null)sortable - Whether given property is user-sortableC resizable(boolean resizable)
resizable - Whether all the item listing columns are user-resizableC resizable(P property, boolean resizable)
property - The property to configure (not null)resizable - Whether given property is user-resizableC visible(P property, boolean visible)
property - The property to configure (not null)visible - Whether given property is visibledefault C hidden(P property)
property - The property to configure (not null)visible(Object, boolean)C readOnly(P property, boolean readOnly)
When a column is read-only, no editor component will be provided when the item is in edit mode.
property - The property to configure (not null)readOnly - Whether given property is read-onlyC frozen(P property, boolean frozen)
property - The property to configure (not null)frozen - Whether given property is frozenC frozenColumns(int frozenColumnsCount)
frozenColumnsCount - The number of columns that should be frozenC width(P property, String width)
property - The property to configure (not null)width - the width to setC autoWidth(P property, boolean autoWidth)
Automatically sets the width of the column based on the columncontents when this is set to true.
For performance reasons the column width is calculated automaticallyonly once when the grid items are rendered for the first time and thecalculation only considers the rows which are currently rendered inDOM (a bit more than what is currently visible). If the grid isscrolled, or the cell content changes, the column width might notmatch the contents anymore.
property - The property to configure (not null)autoWidth - Whether to enable the column auto-widthdefault C autoWidth(P property)
Automatically sets the width of the column based on the columncontents when this is set to true.
For performance reasons the column width is calculated automaticallyonly once when the grid items are rendered for the first time and thecalculation only considers the rows which are currently rendered inDOM (a bit more than what is currently visible). If the grid isscrolled, or the cell content changes, the column width might notmatch the contents anymore.
property - The property to configure (not null)C flexGrow(P property, int flexGrow)
When set to 0, column width is fixed.
property - The property to configure (not null)flexGrow - the flex grow ratio to setC styleNameGenerator(Function<T,String> styleNameGenerator)
Returning null from the generator results in no custom class
name being set. Multiple class names can be returned from the generator as
space-separated.
If a column level CSS class name generator is configured through
styleNameGenerator(Object, Function) together with this method,
resulting class names from both methods will be effective. Class names
generated by listing are applied to the cells before the class names
generated by column. This means that if the classes contain conflicting style
properties, column's classes will win.
styleNameGenerator - The function to use to generate the row CSS style
class nameC styleNameGenerator(P property, Function<T,String> styleNameGenerator)
Returning null from the generator results in no custom class
name being set. Multiple class names can be returned from the generator as
space-separated.
If a row CSS style class name generator is configured through
styleNameGenerator(Function) together with this method, resulting
class names from both generators will be effective. Class names generated by
the listing are applied to the cells before the class names generated by
column. This means that if the classes contain conflicting style properties,
column's classes will win.
property - The property to configure (not null)styleNameGenerator - The function to use to generate the cell CSS style
class nameC expand(P property)
The flew grow value for the provided column will be set to 1,
while the other columns flew grow value will be set to 0.
property - The property which identifies the column to expandC columnsAutoWidth()
autoWidth(Object, boolean)C alignment(P property, ItemListingConfigurator.ColumnAlignment alignment)
Default is ItemListingConfigurator.ColumnAlignment.LEFT.
property - The property to configure (not null)alignment - the text alignment to setC renderer(P property, com.vaadin.flow.data.renderer.Renderer<T> renderer)
Renderer to use for the column which corresponds to given
property.property - The property to configure (not null)renderer - The column renderer to usedefault <R extends com.vaadin.flow.component.Component> C componentRenderer(P property, Function<T,R> renderer)
Component,
using given function to provide the component for each listing item.R - Component typeproperty - The property to configure (not null)renderer - The function to use to provide the component for each listing
item (not null)C valueProvider(P property, com.vaadin.flow.function.ValueProvider<T,String> valueProvider)
ValueProvider to use to obtain the text to display in the
column which corresponds to given property.property - The property to configure (not null)valueProvider - The value provider to useC sortComparator(P property, Comparator<T> comparator)
property - The property to configure (not null)comparator - The comparator to use with in-memory sortingC sortUsing(P property, List<P> sortProperties)
property - The property to configure (not null)sortProperties - The properties to use to sort the columndefault C sortUsing(P property, P... sortProperties)
property - The property to configure (not null)sortProperties - The properties to use to sort the columnC sortProvider(P property, Function<com.holonplatform.core.query.QuerySort.SortDirection,Stream<ItemSort<P>>> sortProvider)
ItemSorts to use when the
column which corresponds to given property is user-sorted.property - The property to configure (not null)sortProvider - Sort providerC header(P property, com.holonplatform.core.i18n.Localizable header)
property - The property to configure (not null)header - Localizable column header text (not null)default C header(P property, String header)
property - The property to configure (not null)header - The column header textdefault C header(P property, String defaultHeader, String headerMessageCode)
property - The property to configure (not null)defaultHeader - The default column header textheaderMessageCode - The column header text translation message codeC headerComponent(P property, com.vaadin.flow.component.Component header)
Component to use as header for the column which corresponds
to given property.property - The property to configure (not null)header - The column header componentC footer(P property, com.holonplatform.core.i18n.Localizable footer)
property - The property to configure (not null)footer - Localizable column footer text (not null)default C footer(P property, String footer)
property - The property to configure (not null)footer - The column footer textdefault C footer(P property, String defaultFooter, String footerMessageCode)
property - The property to configure (not null)defaultFooter - The default column footer textfooterMessageCode - The column footer text translation message codeC footerComponent(P property, com.vaadin.flow.component.Component footer)
Component to use as footer for the column which corresponds
to given property.property - The property to configure (not null)footer - The column footer componentC withColumnPostProcessor(ItemListingConfigurator.ColumnPostProcessor<P> columnPostProcessor)
ItemListingConfigurator.ColumnPostProcessor which can be used to furtherly configure
each listing column before adding it to the listing component.columnPostProcessor - The post processor to add (not null)C pageSize(int pageSize)
Note: the number of items in the server-side memory can be considerably higher than the page size, since the component can show more than one page at a time.
pageSize - the maximum number of items sent per request. Should be
greater than zeroC heightByRows(boolean heightByRows)
true, the listing's height is defined by the number of its
rows. All items are fetched from the data provider, and the Grid shows no
vertical scroll bar.heightByRows - true to make listing compute its height by
the number of rows, false for the default
behaviorC columnReorderingAllowed(boolean columnReorderingAllowed)
columnReorderingAllowed - true if column reordering is
allowedC itemDetailsRenderer(com.vaadin.flow.data.renderer.Renderer<T> renderer)
renderer - the renderer to use for displaying item details rowsdefault C itemDetailsText(Function<T,String> textProvider)
textProvider - The function to provide the item details textdefault C itemDetailsComponent(Function<T,com.vaadin.flow.component.Component> componentProvider)
Component.componentProvider - The function to provide the item details
ComponentC itemDetailsVisibleOnClick(boolean detailsVisibleOnClick)
Default is true.
detailsVisibleOnClick - true to enable opening and closing
item details by clicking the rows,
false otherwiseitemDetailsRenderer(Renderer)C selectionMode(Selectable.SelectionMode selectionMode)
selectionMode - The selection mode to set (not null). Use
Selectable.SelectionMode.NONE to disable selection.C selectAllCheckboxVisibility(com.vaadin.flow.component.grid.GridMultiSelectionModel.SelectAllCheckboxVisibility selectAllCheckBoxVisibility)
The default value is GridMultiSelectionModel.SelectAllCheckboxVisibility.DEFAULT, which means
that the checkbox is only visible if the data provider is in-memory.
selectAllCheckBoxVisibility - The select all checkbox visibility modedefault C singleSelect()
Selectable.SelectionMode.SINGLE.default C multiSelect()
Selectable.SelectionMode.MULTI.default C notSelectable()
Selectable.SelectionMode.NONE.C withSelectionListener(Selectable.SelectionListener<T> selectionListener)
Selectable.SelectionListener to listen to items selection changes.
Selectable.SelectionListeners are triggred only when listing is selectable, i.e.
(i.e. Selectable.SelectionMode is not Selectable.SelectionMode.NONE).
selectionListener - The selection listener to add (not null)C withItemClickListener(ClickEventListener<L,ItemClickEvent<L,T>> listener)
listener - The ClickableRenderer.ItemClickListener to add (not null)C withItemRefreshListener(ItemEventListener<L,T,ItemEvent<L,T>> listener)
The refresh event is fired when tha data provider detect a data change event,
either for all the items or for only one. When only one item is updated, it
is available from ItemEvent.getItem().
listener - The ItemEventListener to add (not null)C multiSort(boolean multiSort)
multiSort - true to enable sorting of multiple columns on
the client-side, false to disableC verticalScrollingEnabled(boolean enabled)
enabled - true to enable vertical scrolling,
false to disabled itItemListingConfigurator.ItemListingContextMenuBuilder<T,P,L,C> contextMenu()
ItemListingConfigurator.ItemListingContextMenuBuilder to configure and add a context
menu to show for each listing item.
Use the ItemListingConfigurator.ItemListingContextMenuBuilder.add() method to add the context
menu to the item listing.
By default, the context menu can be opened with a right click or a long touch on the target component.
C header(Consumer<ItemListingConfigurator.EditableItemListingSection<P>> headerConfigurator)
Consumer to configure the item listing header section,
using the ItemListing.ItemListingSection API.headerConfigurator - The item listing header section configurator (not
null)C footer(Consumer<ItemListingConfigurator.EditableItemListingSection<P>> footerConfigurator)
Consumer to configure the item listing footer section,
using the ItemListing.ItemListingSection API.footerConfigurator - The item listing footer section configurator (not
null)C editable(boolean editable)
Use withEditorSaveListener to register a listener for editor
item save events.
editable - whether the listing is editabledefault C editable()
C editorComponent(P property, Function<T,? extends com.vaadin.flow.component.Component> editorComponentProvider)
Component to display when the column bound to given
property is in editing mode.property - The property for which to set the editor
component (not null)editorComponentProvider - The editor component provider (not null)default C editorComponent(P property, com.vaadin.flow.component.Component editorComponent)
Component to display when the column bound to given
property is in editing mode.property - The property for which to set the editor component
(not null)editorComponent - The editor component (not null)C editorBuffered(boolean buffered)
true.
When the editor is in buffered mode, edits are only committed when the user clicks the save button. In unbuffered mode valid changes are automatically committed.
buffered - Whether the editor is in buffered modeC withEditorSaveListener(ItemListing.EditorSaveListener<T,P> listener)
save events.listener - The listener to add (not null)C withEditorCancelListener(ItemListing.EditorCancelListener<T,P> listener)
cancel events.listener - The listener to add (not null)C withEditorOpenListener(ItemListing.EditorOpenListener<T,P> listener)
open events.listener - The listener to add (not null)C withEditorCloseListener(ItemListing.EditorCloseListener<T,P> listener)
close events.listener - The listener to add (not null)C frozen(boolean frozen)
When the listing is frozen, it never shows any item and no fetch is performed from the data provider.
When the ItemSet.refresh() method is called, the frozen state is
automatically set to false.
frozen - Whether the listing is frozenC rowsDraggable(boolean rowsDraggable)
rowsDraggable - true if the rows can be dragged by the
user, false if notC dragFilter(Predicate<T> dragFilter)
When the rows dragging is enabled, by default all the visible rows can be dragged.
A drag filter function can be used to specify the rows that are available for
dragging. The function receives an item and returns true if the
row can be dragged, false otherwise.
NOTE: If the filtering conditions change dynamically, remember to
explicitly invoke ItemListing.refreshItem(Object) for the relevant
items to get the filters re-run for them.
dragFilter - The drag filter predicate (not null)C dragDataGenerator(String type, Function<T,String> dragDataGenerator)
type as the generator is set here.
The function is executed for each item in the listing during data generation.
Return a String to be appended to the row as type data.type - Type of the generated data. The generated value will
be accessible during drop using this type (not null)dragDataGenerator - Function to be executed on row data generation (not
null)C withDragStartListener(ItemListingDnDListener<T,P,ItemListingDragStartEvent<T,P>> listener)
listener - The listener to add (not null)C withDragEndListener(ItemListingDnDListener<T,P,ItemListingDragEndEvent<T,P>> listener)
listener - The listener to add (not null)C dropMode(com.vaadin.flow.component.grid.dnd.GridDropMode dropMode)
null,
the listing fires drop events upon data drop over the listing or the listing
rows.
When using GridDropMode.ON_TOP, and the listing is either empty or
has empty space after the last row, the drop can still happen on the empty
space, and the drop target item will not be available.
When using GridDropMode.BETWEEN or
GridDropMode.ON_TOP_OR_BETWEEN, and there is at least one row in the
listing, any drop after the last row in the grid will get the last row as the
drop target item. If there are no rows in the listing, then the drop target
item will not be available.
If using GridDropMode.ON_GRID, then the drop will not happen on any
row, but instead just "on the listing". The target row will not be present in
this case.
NOTE: Prefer not using a row specific GridDropMode with a listing
that enables sorting. If for example a new row gets added to a specific
location on drop event, it might not end up in the location of the drop but
rather where the active sorting configuration prefers to place it. This
behavior might feel unexpected for the users.
dropMode - Drop mode that describes the allowed drop locations within
the listing's row. Can be null to disable
droppingC dropFilter(Predicate<T> dropFilter)
When the drop mode of the grid has been set to one of
GridDropMode.BETWEEN, GridDropMode.ON_TOP or
GridDropMode.ON_TOP_OR_BETWEEN, by default all the visible rows can
be dropped over.
A drop filter function can be used to specify the rows that are available for
dropping over. The function receives an item and should return
true if the row can be dropped over, false
otherwise.
NOTE: If the filtering conditions change dynamically, remember to
explicitly invoke ItemListing.refreshItem(Object) for the relevant
items to get the filters re-run for them.
dropFilter - The drop filter predicate (not null)C withDropListener(ItemListingDnDListener<T,P,ItemListingDropEvent<T,P>> listener)
listener - The listener to add (not null)C withColumnResizeListener(ColumnResizeListener<T,P> listener)
listener - The listener to add (not null)C withColumnReorderListener(ColumnReorderListener<T,P> listener)
listener - The listener to add (not null)Copyright © 2020 The Holon Platform. All rights reserved.