on 02-17-2006 8:26 AM
In WD for ABAP, I encounter many troubles when trying to transfer a table with hierarchical column to an actual tree. In my UI, the tree is in the left pane and the detail for a node is in the right.
1. With hierarchical table, I can bind the dataSource of the table directly to the context node in View which is mapped to a context node in component controller which is a DDIC structure. But with a tree, is it possible to map the dataSource of the tree or node in tree to context node in component controller?
2. With hierarchical table, when lead selection changed, the detail info in the right pane will change automatically. But with a tree, it seems to have to be implemented via action by myself.
Can anyone give some suggestions to overcome these troubles?
Wei,
1. Yes, it is possible. Mapping is independed of UI elements used. Any structure could be mapped.
2. Create & assign empty handler for onAction of TreeNode(s) / TreeItem(s)
Valery Silaev
EPAM System
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The conclusion is that the tree UI element is not suitable for this case. Although I fulfilled all functions more or less.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Valery,
could you please suggest a link to the tutorial ?
Thank you very much.
regards, wei
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
did you have a look at this? http://help.sap.com/saphelp_nw04s/helpdata/en/21/ad884118aa1709e10000000a155106/frameset.htm
There are examples of trees in the system in component WDR_TEST_EVENTS in the views starting TREE_
Regards, Heidi
Hi Valery,
For example, there is a context node (named with ORG_UNIT)in component controller which is corresponding to the table of org unit. The org units make up a hierarchy by key and parent key. In the view, there is a context node called TREE_NODE, and it has a recursion node called NODE_CNT. Then where should I map the context node ORG_UNIT ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Wei,
Given the structure you have just described, and your original question...
<i>In WD for ABAP, I encounter many troubles when trying to transfer <b>a table with hierarchical column</b> to an actual tree. In my UI, the tree is in the left pane and the detail for a node is in the right.</i>
...I'm just wondering how you apply such structure to tree table.
Is node ORG_UNIT in component controller recursive node?
VS
Wei,
<i>With tree table, the dataSource of the table is just bound to the context node ORG_UNIT</i>
Hmmm... You said, that this node resides in component controller, not in view controller. Or does it?
Any recursive node that can be displayed with tree table can be displayed with tree as well. Period.
1. Create tree and bind data source to the same node as table data source.
2. Create tree node type and bind it to the same node again.
3. Create one additional calculated attribute in forementioned node (type boolean) that inverts/negates attribute for table column "hasChildren" to tree node "isLeaf".
4. That's all.
VS
Hi Valery,
I followed the steps you mentioned above. I added a recursion node under the ORG_UNIT node, which is also set as the repeated node for the recursion node. But how to display the records as a hierarchy in a convenient way? (Every record has an Id and a parent Id)
Message was edited by: Wei Tang
Wei,
There is a plenty of blog posts / tutorials regarding this issue.
Small hints -- ORG_UNIT should be a recursive node itself, ORG_UNIT must have a supply function that populates current level based on ID from parent element if any or just supply "root" org units if parent element is context element.
VS
But I noticed that if the parent of a context node in View is not mapped, the context node can not be mapped either. As a tree requires a context node acting as the root node for the tree, the subnode may not be mapped to a context node in component controller as a result.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Wei,
<i>As a tree requires a context node acting as the root node for the tree</i> -- root (for IWDTree) and first level (for IWDTreeNode) may be the very same context node.
So there should be no problems. Thoughts?
Valery Silaev
EPAM Systems
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.