Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Edition Table - Multiple Columns Per List/Map Entry
Edition Table - Multiple Columns Per List/Map Entry [message #1798270] Wed, 14 November 2018 18:06 Go to next message
Brandon Lewis is currently offline Brandon LewisFriend
Messages: 268
Registered: May 2012
Senior Member
I can't figure this out from the documentation available. Probably my fault.

I need to create multiple columns whenever I encounter a feature that is a EList or an EMap. Basically I need a column per list entry or a column created per Map Key.

I can't figure out how to do this. I'm in a Sub Line of my Line's Domain Class.

Basically I have an Object with a Map of attributes and I want to create a Column per attribute and have the Column's Header be the Key of the entry and the cell to be the value.

Seems like a pretty common thing to need, but all the online tutorials only give single value attributes as examples and any mention in the documentation I can find that hints of dynamically creating columns assumes i'm already an AQL and Sirius expert (and Lambda expressions in AQL)

I'm sure it all makes sense once you've done it several times. I think maybe it has something to do with Feature Parent Expression? Associated Elements Expression seems to give me a list in the Properties View (but only meaningful content in the Semantic tap (a bunch of blank General tabs created), but doesn't create multiple columns.

[Updated on: Wed, 14 November 2018 18:08]

Report message to a moderator

Re: Edition Table - Multiple Columns Per List/Map Entry [message #1798390 is a reply to message #1798270] Fri, 16 November 2018 16:01 Go to previous messageGo to next message
Laurent Fasani is currently offline Laurent FasaniFriend
Messages: 182
Registered: October 2014
Senior Member
Hello

Yes, indeed, you can't do it dynamically. you have to create as many column as keys you have in your map, supposing you can know every possible key in advance. I think that if neither Header Label expression nor Label Expression returns something, the column size will be 0 which could be a workaround if the key does not exist (and then you would like to not have the column displayed)

Then, you have to use Feature Parent Expression to return the map value of your key, and have the Feature Name be coherent with that map value. Note that the map value has to be monovalued.

Regards
Laurent


Laurent Fasani - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Edition Table - Multiple Columns Per List/Map Entry [message #1798397 is a reply to message #1798390] Fri, 16 November 2018 18:02 Go to previous message
Brandon Lewis is currently offline Brandon LewisFriend
Messages: 268
Registered: May 2012
Senior Member
Laurent Fasani wrote on Fri, 16 November 2018 11:01
Hello

Yes, indeed, you can't do it dynamically


Okay. Thank you.

I'll have to move to a different framework then. My tool has to be able to read a user's model and dynamically create columns because I'll never know what content they put into the model.

Too bad, because I have to manage the code to enable basic table editing in other frameworks whereas most of it came for free in the Edition Table.
Previous Topic:SiriusCon Live 2018
Next Topic:Display of attributes of elements to the diagramm.
Goto Forum:
  


Current Time: Thu Apr 25 01:32:41 GMT 2024

Powered by FUDForum. Page generated in 0.03598 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top