I am wondering whether or not in the bulk editor you can filter the entities for a lookup type field. Or add a lookup field that is based on a data container?
e.g. I have a class
public class MyEntity {
@OneToMany
protected List<MyOtherEntity> subEntities;
@OneToMany
protected List<SubOption> subOptions;
}
public class MyOtherEntity {
@ManyToOne
protected MyEntity myEntity;
@ManyToOne
protected SubOption subOption;
}
I have a screen for MyEntity with a table for MyOtherEntity showing all the rows relating to MyEntity.
I want to be able to bulk edit that table (MyOtherEntity) the column “subOption” where the only subOptions selectable are contained in the MyEntity subOptionsDc.
If that makes sense…
Like is it possible to do something like
bulkEditor.getProperty(subOption).setQuery(select e from demo_SubOption e where e.myEntity = :container_myEntityDc)
there is no such API in BulkEdit action. But you can try to get the field from opened screen. For instance, using BulkEditors you can configure a bulk editor and get a screen instance:
Then in the debug mode you can find component you need. Note, that BulkEditorWindow has its own field factory and for the entity type will be created PickerField.