Passing column and row semantic object when creating a table from a table [message #1816305] |
Fri, 25 October 2019 16:54  |
Eclipse User |
|
|
|
I've solved the following problem but my solution wasn't very clean, so I'd like to know if there is a better way.
I have a cross table (call it "Overview") like the following:
col1 col2 col3
row1 X
row2 X
row3
I have a table creation with a mapping to the intersections, so a user can right-click an X and get a new cross table (call it "Refinement"). Both tables use relation-based intersections.
The Refinement table needs both the row and the column that the user selected from the Overview. Is there a clean way to do this?
I couldn't figure one out. I can easily pass the row's semantic object, but getting the column requires stripping it out of the ContainerView (with the following java code: containerView.getColumn().getSemanticElements().get(0);, which generates a non-API warning).
The problem is worse, though, because the containerView isn't initalized / passed to the Refinement table unless an external Java action is called. So, I created an implementation of IExternalJavaAction where the execute(...) method has an empty body. This works, but feels very clunky.
Is there a better way?
Thanks.
|
|
|
Re: Passing column and row semantic object when creating a table from a table [message #1816376 is a reply to message #1816305] |
Mon, 28 October 2019 12:32  |
Eclipse User |
|
|
|
Hello,
I think that when we designed table representations, the representation creation tools were think up to be executed on the table "semantic root" (The semantic element used for creating the table) not the currently selected intersection. This explains why you are limited to the containerView variable and not have a lineSemantic and columnSemantic like the "Create Cell" tool.
From the top of my head, I do not have a better solution than your own for the moment. I will need to test this case in order to see if I can find a better way to do it.
Best regards,
Steve
|
|
|
Powered by
FUDForum. Page generated in 0.53083 seconds