I want to use an entityPicker in a column of a datagrid. But not sure how it will work.
The following code works well to display and select from a comboBox:
salaryReviewsTable.getEditor().setColumnEditorComponent("performScoreMgr", context -> {
EntityComboBox<PerformanceGrid> comboBox = uiComponents.create(EntityComboBox.class);
comboBox.setItems(performanceGridsDc);
comboBox.setValueSource(context.getValueSourceProvider().getValueSource("performScoreMgr"));
comboBox.setWidthFull();
comboBox.setStatusChangeHandler((Consumer) context.getStatusHandler());
if(userType.equals("hr")) {
comboBox.setReadOnly(true);
}
return comboBox;
});
I tried a similar approach for EntityPicker but didn’t work. Any suggestions?