jmix-docs
jmix-docs copied to clipboard
Integral guide about using Composition in editors
Currently there is lack of information how to create / customize an editor screen with inline or in-dialog editing of some composition-one-to-many relationship "child" entities.
There are several scarse pieces of information in many non-related articles.
Here is what a developer should read now in order to start implementing some custom code using @Composition
:
- 3 paragraphs here: https://docs.jmix.io/jmix/data-model/entities.html#references (starting from "Jmix also supports")
- 1 here https://docs.jmix.io/jmix/data-model/entities.html#composition
- DataContext https://docs.jmix.io/jmix/flow-ui/data/data-context.html - must-know concept for composition
- passing parent data context when opening dialogs: https://docs.jmix.io/jmix/flow-ui/data/data-context.html#parent-data-context
- opening views as dialogs (which is a must in Jmix 2): https://docs.jmix.io/jmix/flow-ui/views/opening-views.html#dialog-windows
- property containers: https://docs.jmix.io/jmix/flow-ui/data/property-containers.html
missing information:
- why one should use composition at all? pros and cons.
Example of a custom code can be: demonstrate how to implement a "Copy" action for a child entity in a composition screen.