If a user adds both columnGenerator and editFieldGenerator via @Install then the result generated column won't be editable, because editFieldGenerator is ignored while coping properties of prev column.
Steps to reproduce
Change GroupTable in the UserBrowse to DataGrid
Set editorEnabled="true"
For username column in the controller use the following code:
4. Launch the app.
5. Try to inline-edit record.
**ER**
ComboBox should be shown for the `username` column.
**AR**
"Generated username: admin" text is shown.
If a user adds both
columnGenerator
andeditFieldGenerator
via@Install
then the result generated column won't be editable, becauseeditFieldGenerator
is ignored while coping properties of prev column.Steps to reproduce
GroupTable
in the UserBrowse toDataGrid
editorEnabled="true"
username
column in the controller use the following code:@Install(to = "usersTable.username", subject = "editFieldGenerator") private Field<?> usersTableUsernameEditFieldGenerator(DataGrid.EditorFieldGenerationContext editorFieldGenerationContext) {
ComboBox comboBox = uiComponents.create(ComboBox.NAME);
Map<String, String> map = new HashMap<>();
map.put("value1", "value1");
comboBox.setOptionsMap(map);
return comboBox;
}
@Install(to = "usersTable.username", subject = "columnGenerator") private String usersTableUsernameColumnGenerator(DataGrid.ColumnGeneratorEvent columnGeneratorEvent) {
return "Generated username: " + columnGeneratorEvent.getItem().getUsername();
}