T
- Item data typeP
- Item property typeC
- Component typeB
- Concrete builder typepublic static interface ItemListingBuilder.BaseGridItemListingBuilder<T,P,C extends ItemListing<T,P>,B extends ItemListingBuilder.BaseGridItemListingBuilder<T,P,C,B>> extends ItemListingBuilder<T,P,C,B,com.vaadin.ui.Grid<T>>
ItemListing
with a Grid
as backing component.ItemListingBuilder.BaseGridItemListingBuilder<T,P,C extends ItemListing<T,P>,B extends ItemListingBuilder.BaseGridItemListingBuilder<T,P,C,B>>, ItemListingBuilder.ColumnHeaderMode, ItemListingBuilder.FooterBuilder<P>, ItemListingBuilder.GridFooterGenerator<T,P>, ItemListingBuilder.GridItemListingBuilder<T,C extends ItemListing<T,String>,B extends ItemListingBuilder.GridItemListingBuilder<T,C,B>>, ItemListingBuilder.GridSection<ROWTYPE>, ItemListingBuilder.HeaderBuilder<P>, ItemListingBuilder.ListingFooterRow<P>, ItemListingBuilder.ListingHeaderRow<P>
ComponentConfigurator.BaseComponentConfigurator
Modifier and Type | Method and Description |
---|---|
B |
commitOnRemove()
Sets to call
ItemListing.commit() to confirm item modifications in data source when an item is
removed using ItemListing.removeItem(Object) and the listing is in buffered mode. |
B |
commitOnSave()
Sets to call
ItemListing.commit() to confirm item modifications in data source when the editor
Save action is triggered and the listing is in buffered mode. |
B |
detailsGenerator(ItemListing.ItemDetailsGenerator<T> detailsGenerator)
Set the
ItemListing.ItemDetailsGenerator to generate row details component |
B |
editorBuffered(boolean editorBuffered)
Set whether the row editor is in buffered mode.
|
B |
editorCancelCaption(com.holonplatform.core.i18n.Localizable caption)
Set the caption for the editor Cancel button.
|
default B |
editorCancelCaption(String caption)
Set the caption for the editor Cancel button
|
default B |
editorCancelCaption(String caption,
String messageCode)
Set the caption for the editor Cancel button
|
B |
editorErrorGenerator(com.vaadin.ui.components.grid.EditorErrorGenerator<T> editorErrorGenerator)
Set the
EditorErrorGenerator of the listing editor. |
B |
editorSaveCaption(com.holonplatform.core.i18n.Localizable caption)
Set the caption for the editor Save button.
|
default B |
editorSaveCaption(String caption)
Set the caption for the editor Save button.
|
default B |
editorSaveCaption(String caption,
String messageCode)
Set the caption for the editor Save button.
|
B |
expandRatio(P property,
int expandRatio)
Set the expandRatio for the column which corresponds to given property.
|
B |
footer(ItemListingBuilder.FooterBuilder<P> builder)
Set the listing footer builder to create and manage footer rows
|
B |
footerGenerator(ItemListingBuilder.GridFooterGenerator<T,P> footerGenerator)
Set a
ItemListingBuilder.GridFooterGenerator to update footer contents when item set changes. |
B |
frozenColumns(int frozenColumnsCount)
Sets the number of frozen columns in this listing.
|
B |
header(ItemListingBuilder.HeaderBuilder<P> builder)
Set the listing header builder to create and manage header rows.
|
B |
headerHTML(P property,
com.holonplatform.core.i18n.Localizable header)
Set the column header for given
property , displaying it as HTML. |
default B |
headerHTML(P property,
String header)
Set the column header for given
property , displaying it as HTML. |
default B |
headerHTML(P property,
String defaultHeader,
String headerMessageCode)
Set the column header for given
property , displaying it as HTML. |
B |
headerMode(P property,
ItemListingBuilder.ColumnHeaderMode headerMode)
Set the column header display mode for the column which corresponds to given property.
|
B |
heightByContents()
Set the height of the listing defined by its contents.
|
B |
heightByRows(double rows)
Set the height of the listing by defined by a number of rows.
|
B |
hidingToggleCaption(P property,
com.holonplatform.core.i18n.Localizable hidingToggleCaption)
Sets the caption of the hiding toggle for the column which corresponds to given property.
|
default B |
hidingToggleCaption(P property,
String hidingToggleCaption)
Sets the caption of the hiding toggle for the column which corresponds to given property.
|
default B |
hidingToggleCaption(P property,
String hidingToggleCaption,
String messageCode)
Sets the caption of the hiding toggle for the column which corresponds to given property.
|
B |
maxWidth(P property,
int widthInPixels)
Set the maximum width in pixels for the column which corresponds to given property.
|
B |
minimumWidthFromContent(P property,
boolean minimumWidthFromContent)
Sets whether the width of the contents in the column which corresponds to given property should be considered
minimum width for this column.
|
B |
minWidth(P property,
int widthInPixels)
Set the minimum width in pixels for the column which corresponds to given property.
|
B |
required(P property)
Set the given property as required in the item listing editor.
|
B |
required(P property,
com.holonplatform.core.i18n.Localizable message)
Set the given property as required in the item listing editor.
|
default B |
required(P property,
String message)
Set the given property as required.
|
default B |
required(P property,
String message,
String messageCode,
Object... arguments)
Set the given property as required in the item listing editor.
|
B |
resizable(P property,
boolean resizable)
Sets whether the column which corresponds to given property is resizable by the user.
|
B |
withEditorCancelListener(com.vaadin.ui.components.grid.EditorCancelListener<T> listener)
Register an item editor cancel listener.
|
B |
withEditorOpenListener(com.vaadin.ui.components.grid.EditorOpenListener<T> listener)
Register an item editor open listener.
|
B |
withEditorSaveListener(com.vaadin.ui.components.grid.EditorSaveListener<T> listener)
Register an item editor save listener.
|
default B |
withValidator(com.holonplatform.core.Validator<T> validator)
Adds an item
Validator to item listing editor. |
B |
withValidator(com.vaadin.data.Validator<T> validator)
Adds an item
Validator to item listing editor. |
alignment, bodyRowHeight, buffered, build, build, columnHidingAllowed, columnReorderingAllowed, commitHandler, defaultValue, displayAfter, displayAsFirst, displayAsLast, displayBefore, editable, editable, footerRowHeight, footerVisible, header, header, header, headerRowHeight, hidable, hidden, hideHeaders, itemDescriptionGenerator, readOnly, rowHeight, selectAllCheckBoxVisibility, selectionMode, sortable, sortable, sortGenerator, sortUsing, style, style, width, withItemClickListener, withPropertyReorderListener, withPropertyResizeListener, withPropertyVisibilityListener, withRowStyle, withSelectionListener
dataSource, dataSource
autoRefresh, batchSize, defaultSort, fixedFilter, fixedSort, maxCacheSize, queryParameter, withQueryConfigurationProvider
build, deferLocalization, dragSource, dropTarget
caption, caption, caption, captionAsHtml, description, description, description, disabled, errorHandler, fullHeight, fullSize, fullWidth, height, height, heightUndefined, hidden, icon, id, notVisible, primaryStyleName, replaceStyleName, responsive, sizeUndefined, styleName, width, width, widthUndefined, withAttachListener, withContextClickListener, withData, withDetachListener, withShortcutListener
withPostProcessor
B heightByContents()
B heightByRows(double rows)
rows
- Number of rows that should be visible in grid's bodyB minWidth(P property, int widthInPixels)
property
- Item property to set the width for (not null)widthInPixels
- Minimum width in pixelB maxWidth(P property, int widthInPixels)
property
- Item property to set the width for (not null)widthInPixels
- Maximum width in pixelB expandRatio(P property, int expandRatio)
By default, all columns expand equally (treated as if all of them had an expand ratio of 1). Once at least one column gets a defined expand ratio, the implicit expand ratio is removed, and only the defined expand ratios are taken into account.
If a column has a defined width, it overrides this method's effects.
Example: A grid with three columns, with expand ratios 0, 1 and 2, respectively. The column with a ratio of 0 is exactly as wide as its contents requires. The column with a ratio of 1 is as wide as it needs, plus a third of any excess space, because we have 3 parts total, and this column reserves only one of those. The column with a ratio of 2, is as wide as it needs to be, plus two thirds of the excess width.
property
- Item property to set the expand ratio for (not null)expandRatio
- Column expand ratio. 0
to not have it expand at allB minimumWidthFromContent(P property, boolean minimumWidthFromContent)
If this is set to true
(default), then a column will not shrink to smaller than the width
required to show the contents available when calculating the widths (only the widths of the initially
rendered rows are considered).
If this is set to false
and the column has been set to expand using
expandRatio(...)
, then the contents of the column will be ignored when calculating the width,
and the column will thus shrink down to the minimum width if necessary.
property
- Item property (not null)minimumWidthFromContent
- true
to reserve space for all contents, false
to
allow the column to shrink smaller than the contentsB hidingToggleCaption(P property, com.holonplatform.core.i18n.Localizable hidingToggleCaption)
property
- Item property to set the caption for (not null)hidingToggleCaption
- Localizable hiding toggle caption (not null)default B hidingToggleCaption(P property, String hidingToggleCaption)
property
- Item property to set the caption for (not null)hidingToggleCaption
- Hiding toggle captiondefault B hidingToggleCaption(P property, String hidingToggleCaption, String messageCode)
property
- Item property to set the caption for (not null)hidingToggleCaption
- Hiding toggle caption default messagemessageCode
- Hiding toggle caption localization message codeB headerMode(P property, ItemListingBuilder.ColumnHeaderMode headerMode)
property
- Property for which to set the header mode (not null)headerMode
- Column header modeB headerHTML(P property, com.holonplatform.core.i18n.Localizable header)
property
, displaying it as HTML. The property/column
ItemListingBuilder.ColumnHeaderMode
will be configured as ItemListingBuilder.ColumnHeaderMode.HTML
.
By default, if the property is Localizable
, the Localizable.getMessage()
(and
Localizable.getMessageCode()
if a LocalizationContext
is available) is used as column header.
property
- Item property to set the header for (not null)header
- Localizable column header (not null)default B headerHTML(P property, String header)
property
, displaying it as HTML. The property/column
ItemListingBuilder.ColumnHeaderMode
will be configured as ItemListingBuilder.ColumnHeaderMode.HTML
.property
- Item property to set the header for (not null)header
- Column headerdefault B headerHTML(P property, String defaultHeader, String headerMessageCode)
property
, displaying it as HTML. The property/column
ItemListingBuilder.ColumnHeaderMode
will be configured as ItemListingBuilder.ColumnHeaderMode.HTML
.property
- Item property to set the header for (not null)defaultHeader
- Default column headerheaderMessageCode
- Column header translation message codeB resizable(P property, boolean resizable)
property
- Item property to set resizable or not (not null)resizable
- true
if the column which corresponds to given property is resizable by the userB frozenColumns(int frozenColumnsCount)
frozenColumnsCount
- The number of columns that should be frozenB editorBuffered(boolean editorBuffered)
SAVE
and
CANCEL
buttons to commit or discard the item modifications (default mode). In the unbuffered
mode, the editor has no buttons and all changed data is committed directly.editorBuffered
- whether the row editor is in buffered modeB editorSaveCaption(com.holonplatform.core.i18n.Localizable caption)
caption
- Localizable caption (not null)default B editorSaveCaption(String caption)
caption
- Button captiondefault B editorSaveCaption(String caption, String messageCode)
caption
- Button captionmessageCode
- Caption translation message codeB editorCancelCaption(com.holonplatform.core.i18n.Localizable caption)
caption
- Localizable caption (not null)default B editorCancelCaption(String caption)
caption
- Button captiondefault B editorCancelCaption(String caption, String messageCode)
caption
- Button captionmessageCode
- Optional caption translation message codeB withEditorSaveListener(com.vaadin.ui.components.grid.EditorSaveListener<T> listener)
listener
- The listener to addB withEditorCancelListener(com.vaadin.ui.components.grid.EditorCancelListener<T> listener)
listener
- The listener to addB withEditorOpenListener(com.vaadin.ui.components.grid.EditorOpenListener<T> listener)
listener
- The listener to addB editorErrorGenerator(com.vaadin.ui.components.grid.EditorErrorGenerator<T> editorErrorGenerator)
EditorErrorGenerator
of the listing editor.editorErrorGenerator
- The error generator to adddefault B withValidator(com.holonplatform.core.Validator<T> validator)
Validator
to item listing editor.validator
- Validator to add (not null)B withValidator(com.vaadin.data.Validator<T> validator)
Validator
to item listing editor.validator
- Validator to add (not null)B required(P property)
property
- Property to set as required (not null)B required(P property, com.holonplatform.core.i18n.Localizable message)
property
- Property to set as required (not null)message
- The message to use to notify the required validation failuredefault B required(P property, String message, String messageCode, Object... arguments)
property
- Property to set as required (not null)message
- The default message to use to notify the required validation failuremessageCode
- The message localization codearguments
- Optional message translation argumentsdefault B required(P property, String message)
Input
bound to the property will
be setted as required, and its validation will fail when empty.property
- Property to set as required (not null)message
- The default message to use to notify the required validation failureB commitOnSave()
ItemListing.commit()
to confirm item modifications in data source when the editor
Save action is triggered and the listing is in buffered mode.B commitOnRemove()
ItemListing.commit()
to confirm item modifications in data source when an item is
removed using ItemListing.removeItem(Object)
and the listing is in buffered mode.B header(ItemListingBuilder.HeaderBuilder<P> builder)
builder
- Header builder (not null)B footer(ItemListingBuilder.FooterBuilder<P> builder)
builder
- Footer builder (not null)B footerGenerator(ItemListingBuilder.GridFooterGenerator<T,P> footerGenerator)
ItemListingBuilder.GridFooterGenerator
to update footer contents when item set changes.footerGenerator
- Footer generatorB detailsGenerator(ItemListing.ItemDetailsGenerator<T> detailsGenerator)
ItemListing.ItemDetailsGenerator
to generate row details componentdetailsGenerator
- Item details generator (not null)Copyright © 2018 The Holon Platform. All rights reserved.