Hierarchical Table [message #1797023] |
Wed, 24 October 2018 04:49  |
Eclipse User |
|
|
|
Hello community,
first of all, I'm pretty new to the java, eclipse and therefore scout world.
At the moment I'm working on a scout project and think that its a pretty awesome framework. I stumbled upon the release notes that Hierarchical Table is now supported with a nice screenshot but no real documentation (as far as i found anything)
So i managed to import my pageData from the database and display it in a regular table with columns etc.
Now as i read about the hierachical table it made a lot of sense to me and would improve the readability etc for the user.
I have
a Project which has an int ID
and it MAY have a parentProjectId.
So i thought it would be easy to tell the table that the parentKey is the ID itself and then go for the parentProjectId to map it to the given ProjectIds.
But unfortunately i dont get it to run. So if anyone has a tip or a little example for me how to handle this, i would really appreciate your effort!
And sorry if i miss anything in my explanation, first timer on this board :)
|
|
|
|
|
|
|
Re: Hierarchical Table [message #1797171 is a reply to message #1797093] |
Fri, 26 October 2018 11:41  |
Eclipse User |
|
|
|
Hi The Maddes
Ok, that I guess was the problem: A Long and Integer are not equal, even if the represent the same number.
Typically, you'd have the same class as generic type for parent and primary key columns (if the hierarchy of rows represents objects of the same "kind").
Example: You have a hierarchical table of people in an organization - the primary key would be "Long" (the employee id) and the parent key as well "Long" (for example: the employee id of the manager of the person). This works out of the box.
If that is not the case since the hierarchy is of different objects at different levels (with different keys), custom handling is necessary.
|
|
|
Powered by
FUDForum. Page generated in 0.06322 seconds