The generatedType attribute of <column/> element is not used since there are parameterized renderers and install delegates for declarative installation of column generator.
The type attribute of DataGrid.Column is only used to check for equality with the Boolean.class and set the CheckBoxRenderer, if this comparison is true. The metaProperty.getJavaType() method call can replace the use of type attribute.
Solution
The type and generatedType attributes of DataGrid.Column have been moved to the cuba module. ColumnGenerator and GenericColumnGenerator interfaces also have been moved to the cuba module.
Now, the jmix-ui module contains two methods for setting the generated column:
1) addGeneratedColumn(String columnId, Function<ColumnGeneratorEvent<E>, ?> generator)Usage example:
Description of the bug or enhancement
Cuba platform issue - cuba-platform/cuba#2898
The
generatedType
attribute of<column/>
element is not used since there are parameterized renderers and install delegates for declarative installation of column generator. Thetype
attribute ofDataGrid.Column
is only used to check for equality with theBoolean.class
and set the CheckBoxRenderer, if this comparison is true. ThemetaProperty.getJavaType()
method call can replace the use oftype
attribute.Solution
The
type
andgeneratedType
attributes ofDataGrid.Column
have been moved to thecuba
module.ColumnGenerator
andGenericColumnGenerator
interfaces also have been moved to thecuba
module.Now, the
jmix-ui
module contains two methods for setting the generated column: 1)addGeneratedColumn(String columnId, Function<ColumnGeneratorEvent<E>, ?> generator)
Usage example:2)
addGeneratedColumn(String columnId, Function<ColumnGeneratorEvent<E>, ?> generator, int index)
Usage example:The user can also create a generated column using the install delegate:
The
layout.xsd
file injmix-ui
module does not consistgeneratedType
attribute forDataGrid.Column
elemnt.