com.vaadin.flow.component.grid.
Class Grid<T>
- java.lang.Object
-
- com.vaadin.flow.component.Component
-
- com.vaadin.flow.component.grid.Grid<T>
-
Type Parameters:
T
- the grid bean typeAll Implemented Interfaces:
AttachNotifier, BlurNotifier<Grid<T>>, DetachNotifier, Focusable<Grid<T>>, FocusNotifier<Grid<T>>, HasElement, HasEnabled, HasSize, HasStyle, HasDataProvider<T>, HasItems<T>, SortEvent.SortNotifier<Grid<T>,GridSortOrder<T>>, Serializable
@Tag(value="vaadin-grid") @HtmlImport(value="frontend://bower_components/vaadin-grid/src/vaadin-grid.html") @HtmlImport(value="frontend://bower_components/vaadin-grid/src/vaadin-grid-column.html") @HtmlImport(value="frontend://bower_components/vaadin-grid/src/vaadin-grid-sorter.html") @HtmlImport(value="frontend://bower_components/vaadin-checkbox/src/vaadin-checkbox.html") @HtmlImport(value="frontend://flow-component-renderer.html") @JavaScript(value="frontend://gridConnector.js") public class Grid<T> extends Component implements HasDataProvider<T>, HasStyle, HasSize, Focusable<Grid<T>>, SortEvent.SortNotifier<Grid<T>,GridSortOrder<T>>
Server-side component for the
<vaadin-grid>
element.Author:
Vaadin Ltd
See Also:
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static class
Grid.AbstractGridExtension<T>
A helper base class for creating extensions for the Grid component.
static class
Grid.Column<T>
Server-side component for the
<vaadin-grid-column>
element.static class
Grid.SelectionMode
Selection mode representing the built-in selection models in grid.
-
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
Constructors Constructor and Description Grid()
Creates a new instance, with page size of 50.
Grid(Class<T> beanType)
Creates a new grid with an initial set of columns for each of the bean's properties.
Grid(int pageSize)
Creates a new instance, with the specified page size.
-
Method Summary
All Methods Modifier and Type Method and Description Grid.Column<T>
addColumn(Renderer<T> renderer)
Adds a new text column to this
Grid
with a renderer.Grid.Column<T>
addColumn(Renderer<T> renderer, String... sortingProperties)
Adds a new text column to this
Grid
with a template renderer and sorting properties.Grid.Column<T>
addColumn(String propertyName)
Adds a new column for the given property name.
Grid.Column<T>
addColumn(ValueProvider<T,?> valueProvider)
Adds a new text column to this
Grid
with a value provider.<V extends Comparable<? super V>>
Grid.Column<T>addColumn(ValueProvider<T,V> valueProvider, String... sortingProperties)
Adds a new text column to this
Grid
with a value provider and sorting properties.<V extends Component>
Grid.Column<T>addComponentColumn(ValueProvider<T,V> componentProvider)
Adds a new column that shows components.
protected HeaderRow
addFirstHeaderRow()
Registration
addSelectionListener(SelectionListener<Grid<T>,T> listener)
Adds a selection listener to the current selection model.
Registration
addSortListener(ComponentEventListener<SortEvent<Grid<T>,GridSortOrder<T>>> listener)
Adds a sort order change listener that gets notified when the sort order changes.
FooterRow
appendFooterRow()
Adds a new footer row to the bottom of the existing footer rows.
HeaderRow
appendHeaderRow()
Adds a new header row to the bottom of the existing header rows.
MultiSelect<Grid<T>,T>
asMultiSelect()
Use this grid as a multiselect in
Binder
.SingleSelect<Grid<T>,T>
asSingleSelect()
Use this grid as a single select in
Binder
.protected SerializableComparator<T>
createSortingComparator()
Creates a comparator for grid to sort rows.
void
deselect(T item)
This method is a shorthand that delegates to the currently set selection model.
void
deselectAll()
This method is a shorthand that delegates to the currently set selection model.
Grid.Column<T>
getColumnByKey(String columnKey)
Gets a
Grid.Column
of this grid by its key.protected List<com.vaadin.flow.component.grid.ColumnLayer>
getColumnLayers()
List<Grid.Column<T>>
getColumns()
Gets an unmodifiable list of all
Grid.Column
s currently in thisGrid
.DataCommunicator<T>
getDataCommunicator()
Returns the data communicator of this Grid.
DataProvider<T,?>
getDataProvider()
Returns the data provider of this grid.
protected HeaderRow
getDefaultHeaderRow()
List<FooterRow>
getFooterRows()
Gets all of the footer rows in the Grid, in order from top to bottom.
List<HeaderRow>
getHeaderRows()
Gets all of the header rows in the Grid, in order from top to bottom.
int
getPageSize()
Gets the current page size, which is the number of items fetched at a time from the dataprovider.
Set<T>
getSelectedItems()
This method is a shorthand that delegates to the currently set selection model.
GridSelectionModel<T>
getSelectionModel()
Returns the selection model for this grid.
protected com.vaadin.flow.component.grid.ColumnLayer
insertColumnLayer(int index, List<com.vaadin.flow.component.grid.AbstractColumn<?>> columns)
Creates a new layer from the provided columns, inserts the layer into given index and returns the new layer.
boolean
isColumnReorderingAllowed()
Returns whether column reordering is allowed.
boolean
isDetailsVisible(T item)
Returns the visibility of details component for given item.
boolean
isDetailsVisibleOnClick()
Gets whether the item details are opened and closed by clicking the rows or not.
boolean
isHeightByRows()
Gets whether grid's height is defined by the number of its rows.
boolean
isMultiSort()
Gets whether multiple column sorting is enabled on the client-side.
void
onEnabledStateChanged(boolean enabled)
Handle component enable state when the enabled state changes.
FooterRow
prependFooterRow()
Adds a new footer row on the top of the existing footer rows.
HeaderRow
prependHeaderRow()
Adds a new header row on the top of the existing header rows.
void
removeColumn(Grid.Column<T> column)
Removes a column from the Grid.
void
removeColumnByKey(String columnKey)
Removes a column with the given column key from the Grid.
protected void
removeColumnLayer(com.vaadin.flow.component.grid.ColumnLayer layer)
Removes the given layer and moves the columns on the lower level to its place.
void
select(T item)
This method is a shorthand that delegates to the currently set selection model.
protected void
setColumnKey(String key, Grid.Column column)
Sets a user-defined identifier for given column.
void
setColumnReorderingAllowed(boolean columnReorderingAllowed)
Sets whether or not column reordering is allowed.
void
setColumns(String... propertyNames)
Sets the columns and their order based on the given properties.
void
setDataProvider(DataProvider<T,?> dataProvider)
Sets the data provider for this listing.
void
setDetailsVisible(T item, boolean visible)
Sets the visibility of details component for given item.
void
setDetailsVisibleOnClick(boolean detailsVisibleOnClick)
Sets whether the item details can be opened and closed by clicking the rows or not.
void
setHeightByRows(boolean heightByRows)
If
true
, the grid's height is defined by the number of its rows.void
setItemDetailsRenderer(Renderer<T> renderer)
Set the renderer to use for displaying the item details rows in this grid.
void
setMultiSort(boolean multiSort)
Sets whether multiple column sorting is enabled on the client-side.
void
setPageSize(int pageSize)
Sets the page size, which is the number of items fetched at a time from the dataprovider.
GridSelectionModel<T>
setSelectionMode(Grid.SelectionMode selectionMode)
Sets the grid's selection mode.
protected void
setSelectionModel(GridSelectionModel<T> model, Grid.SelectionMode selectionMode)
Sets the selection model for the grid.
-
Methods inherited from class com.vaadin.flow.component.Component
addListener, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getLocale, getParent, getTranslation, getTranslation, getUI, hasListener, isTemplateMapped, isVisible, onAttach, onDetach, 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.data.binder.HasDataProvider
setItems
-
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.HasSize
getHeight, getWidth, setHeight, setSizeFull, setSizeUndefined, setWidth
-
Methods inherited from interface com.vaadin.flow.component.Focusable
blur, focus, getTabIndex, setTabIndex
-
Methods inherited from interface com.vaadin.flow.component.BlurNotifier
addBlurListener
-
Methods inherited from interface com.vaadin.flow.component.FocusNotifier
addFocusListener
-
Methods inherited from interface com.vaadin.flow.component.HasEnabled
isEnabled, setEnabled
-
Methods inherited from interface com.vaadin.flow.component.HasElement
getElement
-
Methods inherited from interface com.vaadin.flow.component.AttachNotifier
addAttachListener
-
Methods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListener
-
-
-
-
Constructor Detail
-
Grid
public Grid()
Creates a new instance, with page size of 50.
-
Grid
public Grid(int pageSize)
Creates a new instance, with the specified page size.
The page size influences the
Query.getLimit()
sent by the client, but it's up to the webcomponent to determine the actual query limit, based on the height of the component and scroll position. Usually the limit is 3 times the page size (e.g. 150 items with a page size of 50).Parameters:
pageSize
- the page size. Must be greater than zero.
-
Grid
public Grid(Class<T> beanType)
Creates a new grid with an initial set of columns for each of the bean's properties. The property-values of the bean will be converted to Strings. Full names of the properties will be used as the
column keys
and the property captions will be used as thecolumn headers
. The generated columns will be sortable by default, if the property isComparable
.By default, only the direct properties of the bean are included and they will be in alphabetical order. Use
setColumns(String...)
to define which properties to include and in which order. You can also add a column for an individual property withaddColumn(String)
. Both of these methods support also sub-properties with dot-notation, eg."property.nestedProperty"
.Parameters:
beanType
- the bean type to use, notnull
-
-
Method Detail
-
addColumn
public Grid.Column<T> addColumn(ValueProvider<T,?> valueProvider)
Adds a new text column to this
Grid
with a value provider. The value is converted to String when sent to the client by usingString.valueOf(Object)
.NOTE: For displaying components, see
addComponentColumn(ValueProvider)
. For using build-in renderers, seeaddColumn(Renderer)
.Parameters:
valueProvider
- the value providerReturns:
the created column
See Also:
-
addComponentColumn
public <V extends Component> Grid.Column<T> addComponentColumn(ValueProvider<T,V> componentProvider)
Adds a new column that shows components.
This is a shorthand for
addColumn(Renderer)
with aComponentRenderer
.NOTE: Using
ComponentRenderer
is not as efficient as the built in renderers or usingTemplateRenderer
.Type Parameters:
V
- the component typeParameters:
componentProvider
- a value provider that will return a component for the given itemReturns:
the new column
See Also:
-
addColumn
public <V extends Comparable<? super V>> Grid.Column<T> addColumn(ValueProvider<T,V> valueProvider, String... sortingProperties)
Adds a new text column to this
Grid
with a value provider and sorting properties. The value is converted to a JSON value by usingJsonSerializer.toJson(Object)
. The sorting properties are used to configure backend sorting for this column. In-memory sorting is automatically configured using the return type of the givenValueProvider
.Parameters:
valueProvider
- the value providersortingProperties
- the sorting properties to use with this columnReturns:
the created column
See Also:
Grid.Column.setComparator(ValueProvider)
,Grid.Column.setSortProperty(String...)
-
addColumn
public Grid.Column<T> addColumn(Renderer<T> renderer)
Adds a new text column to this
Grid
with a renderer.See implementations of the
Renderer
interface for built-in renderer options with type safe APIs. For a renderer using template binding, useTemplateRenderer.of(String)
.NOTE: You can add component columns easily using the
addComponentColumn(ValueProvider)
, but usingComponentRenderer
is not as efficient as the built in renderers or usingTemplateRenderer
.Parameters:
renderer
- the renderer used to create the grid cell structureReturns:
the created column
See Also:
TemplateRenderer.of(String)
,addComponentColumn(ValueProvider)
-
addColumn
public Grid.Column<T> addColumn(Renderer<T> renderer, String... sortingProperties)
Adds a new text column to this
Grid
with a template renderer and sorting properties. The values inside the renderer are converted to JSON values by usingJsonSerializer.toJson(Object)
.NOTE: You can add component columns easily using the
addComponentColumn(ValueProvider)
, but usingComponentRenderer
is not as efficient as the built in renderers or usingTemplateRenderer
.This constructor attempts to automatically configure both in-memory and backend sorting using the given sorting properties and matching those with the property names used in the given renderer.
Note: if a property of the renderer that is used as a sorting property does not extend Comparable, no in-memory sorting is configured for it.
Parameters:
renderer
- the renderer used to create the grid cell structuresortingProperties
- the sorting properties to use for this columnReturns:
the created column
-
addColumn
public Grid.Column<T> addColumn(String propertyName)
Adds a new column for the given property name. The property values are converted to Strings in the grid cells. The property's full name will be used as the
column key
and the property caption will be used as thecolumn header
.You can add columns for nested properties with dot notation, eg.
"property.nestedProperty"
If the property is
Comparable
, the created column is sortable by default. This can be changed with theGrid.Column.setSortable(boolean)
method.Note: This method can only be used for a Grid created from a bean type with
Grid(Class)
.Parameters:
propertyName
- the property name of the new column, notnull
Returns:
the created column
-
setColumns
public void setColumns(String... propertyNames)
Sets the columns and their order based on the given properties.
This is a shortcut for removing all columns and then calling
addColumn(String)
for each of the given propertyNames.You can add columns for nested properties with dot notation, eg.
"property.nestedProperty"
Note that this also resets the headers and footers.
Note: This method can only be used for a Grid created from a bean type with
Grid(Class)
.Parameters:
propertyNames
- the properties to create columns for
-
setColumnKey
protected void setColumnKey(String key, Grid.Column column)
Sets a user-defined identifier for given column.
Parameters:
column
- the columnkey
- the user-defined identifierSee Also:
-
prependHeaderRow
public HeaderRow prependHeaderRow()
Adds a new header row on the top of the existing header rows.
If there are no existing header rows, this will create the first row.
Returns:
the created header row
-
appendHeaderRow
public HeaderRow appendHeaderRow()
Adds a new header row to the bottom of the existing header rows.
If there are no existing header rows, this will create the first row.
Returns:
the created header row
-
addFirstHeaderRow
protected HeaderRow addFirstHeaderRow()
-
getDefaultHeaderRow
protected HeaderRow getDefaultHeaderRow()
-
prependFooterRow
public FooterRow prependFooterRow()
Adds a new footer row on the top of the existing footer rows.
If there are no existing footer rows, this will create the first row.
Returns:
the created footer row
-
appendFooterRow
public FooterRow appendFooterRow()
Adds a new footer row to the bottom of the existing footer rows.
If there are no existing footer rows, this will create the first row.
Returns:
the created header row
-
getColumnLayers
protected List<com.vaadin.flow.component.grid.ColumnLayer> getColumnLayers()
-
getHeaderRows
public List<HeaderRow> getHeaderRows()
Gets all of the header rows in the Grid, in order from top to bottom.
Returns:
the header rows of the Grid
-
getFooterRows
public List<FooterRow> getFooterRows()
Gets all of the footer rows in the Grid, in order from top to bottom.
Returns:
the footer rows of the Grid
-
insertColumnLayer
protected com.vaadin.flow.component.grid.ColumnLayer insertColumnLayer(int index, List<com.vaadin.flow.component.grid.AbstractColumn<?>> columns)
Creates a new layer from the provided columns, inserts the layer into given index and returns the new layer.
The user of this method should make sure that the DOM corresponds the column layer structure.
Parameters:
index
- the index to insertcolumns
- the column components that the new layer will wrapReturns:
the new layer
-
removeColumnLayer
protected void removeColumnLayer(com.vaadin.flow.component.grid.ColumnLayer layer)
Removes the given layer and moves the columns on the lower level to its place.
Parameters:
layer
- the layer to remove, not the bottom layer
-
setDataProvider
public void setDataProvider(DataProvider<T,?> dataProvider)
Description copied from interface:
HasDataProvider
Sets the data provider for this listing. The data provider is queried for displayed items as needed.
Specified by:
setDataProvider
in interfaceHasDataProvider<T>
Parameters:
dataProvider
- the data provider, not null
-
getDataProvider
public DataProvider<T,?> getDataProvider()
Returns the data provider of this grid.
Returns:
the data provider of this grid, not
null
-
getDataCommunicator
public DataCommunicator<T> getDataCommunicator()
Returns the data communicator of this Grid.
Returns:
the data communicator, not
null
-
getPageSize
public int getPageSize()
Gets the current page size, which is the number of items fetched at a time from the dataprovider.
Returns:
the current page size
-
setPageSize
public void setPageSize(int pageSize)
Sets the page size, which is the number of items fetched at a time from the dataprovider.
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.
Setting the pageSize after the Grid has been rendered effectively resets the component, and the current page(s) and sent over again.
Parameters:
pageSize
- the maximum number of items sent per request. Should be greater than zero
-
getSelectionModel
public GridSelectionModel<T> getSelectionModel()
Returns the selection model for this grid.
Returns:
the selection model, not null
-
setSelectionModel
protected void setSelectionModel(GridSelectionModel<T> model, Grid.SelectionMode selectionMode)
Sets the selection model for the grid.
This method is for setting a custom selection model, and is
protected
becausesetSelectionMode(SelectionMode)
should be used for easy switching between built-in selection models.The default selection model is
GridSingleSelectionModel
.To use a custom selection model, you can e.g. extend the grid call this method with your custom selection model.
Parameters:
model
- the selection model to use, notnull
selectionMode
- the selection mode this selection model corresponds to, notnull
See Also:
-
setSelectionMode
public GridSelectionModel<T> setSelectionMode(Grid.SelectionMode selectionMode)
Sets the grid's selection mode.
To use your custom selection model, you can use
setSelectionModel(GridSelectionModel, SelectionMode)
, see existing selection model implementations for example.Parameters:
selectionMode
- the selection mode to switch to, notnull
Returns:
the used selection model
See Also:
Grid.SelectionMode
,GridSelectionModel
,setSelectionModel(GridSelectionModel, SelectionMode)
-
asSingleSelect
public SingleSelect<Grid<T>,T> asSingleSelect()
Use this grid as a single select in
Binder
.Throws
IllegalStateException
if the grid is not using aGridSingleSelectionModel
.Returns:
the single select wrapper that can be used in binder
Throws:
IllegalStateException
- if not using a single selection model
-
asMultiSelect
public MultiSelect<Grid<T>,T> asMultiSelect()
Use this grid as a multiselect in
Binder
.Throws
IllegalStateException
if the grid is not using aGridMultiSelectionModel
.Returns:
the multiselect wrapper that can be used in binder
Throws:
IllegalStateException
- if not using a multiselection model
-
getSelectedItems
public Set<T> getSelectedItems()
This method is a shorthand that delegates to the currently set selection model.
Returns:
a set with the selected items, never
null
See Also:
-
select
public void select(T item)
This method is a shorthand that delegates to the currently set selection model.
Parameters:
item
- the item to selectSee Also:
-
deselect
public void deselect(T item)
This method is a shorthand that delegates to the currently set selection model.
Parameters:
item
- the item to deselectSee Also:
-
deselectAll
public void deselectAll()
This method is a shorthand that delegates to the currently set selection model.
See Also:
-
addSelectionListener
public Registration addSelectionListener(SelectionListener<Grid<T>,T> listener)
Adds a selection listener to the current selection model.
This is a shorthand for
grid.getSelectionModel().addSelectionListener()
. To get more detailed selection events, usegetSelectionModel()
and eitherGridSingleSelectionModel.addSingleSelectionListener(SingleSelectionListener)
orGridMultiSelectionModel.addMultiSelectionListener(MultiSelectionListener)
depending on the used selection mode.Parameters:
listener
- the listener to addReturns:
a registration handle to remove the listener
Throws:
UnsupportedOperationException
- if selection has been disabled withGrid.SelectionMode.NONE
-
setItemDetailsRenderer
public void setItemDetailsRenderer(Renderer<T> renderer)
Set the renderer to use for displaying the item details rows in this grid.
Parameters:
renderer
- the renderer to use for displaying item details rows,null
to remove the current renderer
-
isColumnReorderingAllowed
@Synchronize(value="column-reordering-allowed-changed") public boolean isColumnReorderingAllowed()
Returns whether column reordering is allowed. Default value is
false
.Returns:
true if reordering is allowed
-
setColumnReorderingAllowed
public void setColumnReorderingAllowed(boolean columnReorderingAllowed)
Sets whether or not column reordering is allowed. Default value is
false
.Parameters:
columnReorderingAllowed
- specifies whether column reordering is allowed
-
getColumns
public List<Grid.Column<T>> getColumns()
Gets an unmodifiable list of all
Grid.Column
s currently in thisGrid
.Note: If column reordering is enabled with
setColumnReorderingAllowed(boolean)
and the user has reordered the columns, the order of the list returned by this method might not be correct.Returns:
unmodifiable list of columns
-
getColumnByKey
public Grid.Column<T> getColumnByKey(String columnKey)
Gets a
Grid.Column
of this grid by its key.Parameters:
columnKey
- the identifier key of the column to getReturns:
the column corresponding to the given column key, or
null
if no column has such keySee Also:
-
removeColumnByKey
public void removeColumnByKey(String columnKey)
Removes a column with the given column key from the Grid.
Parameters:
columnKey
- the key of the column, assigned byGrid.Column.setKey(String)
, or automatically created when usingGrid(Class)
. Cannot benull
Throws:
IllegalArgumentException
- if the column is not part of this Grid
-
removeColumn
public void removeColumn(Grid.Column<T> column)
Removes a column from the Grid.
Parameters:
column
- the column to be removed, notnull
Throws:
IllegalArgumentException
- if column isnull
or if it is not part of this Grid
-
setDetailsVisible
public void setDetailsVisible(T item, boolean visible)
Sets the visibility of details component for given item.
Parameters:
item
- the item to show details forvisible
-true
if details component should be visible;false
if it should be hidden
-
setDetailsVisibleOnClick
public void setDetailsVisibleOnClick(boolean detailsVisibleOnClick)
Sets whether the item details can be opened and closed by clicking the rows or not.
Parameters:
detailsVisibleOnClick
-true
to enable opening and closing item details by clicking the rows,false
to disable this functionalitySee Also:
-
isDetailsVisibleOnClick
public boolean isDetailsVisibleOnClick()
Gets whether the item details are opened and closed by clicking the rows or not.
Returns:
true
if clicking the rows opens and closes their item details,false
otherwiseSee Also:
-
isDetailsVisible
public boolean isDetailsVisible(T item)
Returns the visibility of details component for given item.
Parameters:
item
- the item to show details forReturns:
true
if details component should be visible;false
if it should be hidden
-
addSortListener
public Registration addSortListener(ComponentEventListener<SortEvent<Grid<T>,GridSortOrder<T>>> listener)
Description copied from interface:
SortEvent.SortNotifier
Adds a sort order change listener that gets notified when the sort order changes.
Specified by:
addSortListener
in interfaceSortEvent.SortNotifier<Grid<T>,GridSortOrder<T>>
Parameters:
listener
- the sort order change listener to addReturns:
a registration object for removing the listener
-
setMultiSort
public void setMultiSort(boolean multiSort)
Sets whether multiple column sorting is enabled on the client-side.
Parameters:
multiSort
-true
to enable sorting of multiple columns on the client-side,false
to disable
-
isMultiSort
public boolean isMultiSort()
Gets whether multiple column sorting is enabled on the client-side.
Returns:
true
if sorting of multiple columns is enabled,false
otherwiseSee Also:
-
createSortingComparator
protected SerializableComparator<T> createSortingComparator()
Creates a comparator for grid to sort rows.
Returns:
the comparator based on column sorting information.
-
setHeightByRows
public void setHeightByRows(boolean heightByRows)
If
true
, the grid's height is defined by the number of its rows. All items are fetched from theDataProvider
, and the Grid shows no vertical scroll bar.Parameters:
heightByRows
-true
to make Grid compute its height by the number of rows,false
for the default behavior
-
isHeightByRows
@Synchronize(value="height-by-rows-changed") public boolean isHeightByRows()
Gets whether grid's height is defined by the number of its rows.
Returns:
true
if Grid computes its height by the number of rows,false
otherwise
-
onEnabledStateChanged
public void onEnabledStateChanged(boolean enabled)
Description copied from class:
Component
Handle component enable state when the enabled state changes.
By default this sets or removes the 'disabled' attribute from the element. This can be overridden to have custom handling.
Overrides:
onEnabledStateChanged
in classComponent
Parameters:
enabled
- the new enabled state of the component
-
-