Hi!
In the report parameter creation page, when selecting ‘Entity’ as the parameter type, an entityPicker is opened to choose a single field from the specified dictionary.
It is created programmatically in the ParameterFieldCreator class within the createField method.
public Field createField(ReportInputParameter parameter) {
boolean isLookup = Boolean.TRUE.equals(parameter.getLookup());
MetaClass entityMetaClass = metadata.getClass(parameter.getEntityMetaClass());
EntityPicker field = isLookup
? createEntityComboBox(parameter, entityMetaClass)
: createEntityPicker();
field.setMetaClass(entityMetaClass);
EntityLookupAction pickerLookupAction = (EntityLookupAction) actions.create(EntityLookupAction.ID);
field.addAction(pickerLookupAction);
String parameterScreen = parameter.getScreen();
if (StringUtils.isNotEmpty(parameterScreen)) {
pickerLookupAction.setScreenId(parameterScreen);
}
Action entityClearAction = actions.create(EntityClearAction.ID);
field.addAction(entityClearAction);
return field;
}
I’m overriding it, is it possible to pass a parameter to the opened Browse screen?
I’m using Jmix version: 1.5.3
Jmix Studio plugin version: 2.0.3-232
IntelliJ version: IntelliJ IDEA 2023.2.2 (Ultimate Edition)