I’ve been messing about trying to create a Combined Browse/Edit screen for use with Multiple Inheritance Entities.
I have a Person that has relationships with other people. Each relationship has different data requirements. So I have the following entities
- Relationship (JOINED inheritance strategy defined)
Then I have the following Entities that inherit from Relationship.
So ideally I wanted a Combined Browse/Edit screen to show a basic list of Relationships and the ability to create and edit the more detailed Inherited Relationship Entities. Like this image shows.
I didn’t find anything in CUBA that did exactly what I needed so I took the current EntityCombinedScreen class and created a EntityInheritanceCombinedScreen
So my new screen has a PopupButton for the create action as shown here.
I have multiple FieldGroups based on different Datasources and each FieldGroup is in a Tab. The EntityInheritanceCombinedScreen takes care of switching the Tabs to show the correct FieldGroup for the Selected Item or the New Item. as shown here.
I’ve only being using CUBA for a couple of months so I don’t claim that this is exactly how it should be done or if if it should be done. It does all seems to hang together pretty well so I think that is a good sign.
I’ve added my project that I was trying to work this out in. If anyone does have a look and spots issues can they share the issue and fix if you have one.
SelfReferencing.zip (570.5 KB)
Project zip as created by Gradle zipProject
SelfReferencing.zip (91.2 KB)