Hi all,
I have a screen showing company data and a field on it showing communication data. Communication is a composition in the company and has fields as mobile phone, webpage etc.
When clicking on the open_composition action next to the field, an editor is opened and allows editing of the data.
The EditorBuilderProcessor decides if the editor’s dataContext should be set to the parent, which is usually correct for a composition, so the composition gets saved with the parent entities save.
Now I have set the company screen to readOnly because I don’t want edits to be made there. The parentDatacontext now is a NoopDataContext. If this is set as dataContext in the editor for the communication, an error occurs:
java.lang.IllegalArgumentException: Unsupported DataContext type: io.jmix.ui.model.impl.NoopDataContext. Parent DataContext must implement DataContextInternal
at io.jmix.ui.model.impl.DataContextImpl.setParent(DataContextImpl.java:105)
at io.jmix.ui.builder.EditorBuilderProcessor.buildEditor(EditorBuilderProcessor.java:144)
at io.jmix.ui.builder.EditorBuilder.build(EditorBuilder.java:355)
I think the editor should get its own dataContext in that scenario.
Is there a workaround I can use for now?
Thanks!