|[EMF Forms] Table: Single column for different EStructuralFeatures [message #1767862]
||Tue, 11 July 2017 17:04
| Andreas Fogados
Registered: July 2017
I have a question regarding the TableControl holding different subtypes of one common supertype.
In my case, some of those subtypes have eAttributes of the same type, let's say String.
Now the only way I see is to create a column with a respective FeaturePathDomainModelReference (FPDMR) for each of the subtype-attributes.
But this leads to exceptions thrown for each element in the table which is not containing that specific FPDMR. Furthermore, this would require columns for each subtype I want to handle in that table (which can get pretty much pretty soon, e.g. if there are 15 different subtypes).
To clarify what i mean, i created a small example model:
Let's say i want to create a table holding all UniversityMembers. I want to use 3 columns: "name", "firstname" and one called "id". As you can see, the ids are not part of the common supertypes, because only the professor and the student, but not the caretaker got one. Can i now somehow use one column to show and edit the two different ids of Professor and Student (For the caretaker this cell should just stay empty and be not editable)? Because the only way I see is to create 2 columns, one for the Student-ID and one for the Professor-ID, but that doesn't solve the 2 problems mentioned above, meaning the exceptions and the case when there are for example 12 subtypes of UniversityMember containing some kind of an id and 5 subtypes not containing such an id.
(one sidenote: I can not change the structure of the domain-model)
Powered by FUDForum
. Page generated in 0.01546 seconds