on 06-08-2009 9:27 AM
Hi Experts,
I am using Tree UI element doing KM application. My tree structure is
SAP--folder
-SDN-folder
-
forumn---folder
thread-folder
--a)1.txt
-- etc
In my Km path look like <root folder>/SAP/SDN/forumn/thread/
I need to select thread folder it will display all files under thread folder only. my question is if i select thread folder. how to i get entire path in the tree struture?? (tree structure is dynamic) i got tree structure? i am struggling getting the path from tree structure?How to do that? give your suggestions?
Regards,
Manivannan P
Hi,
Custom way of achieving this: Create one more context attribute in your TreeNode. And evertime whenever you populate an entry in the tree node then append the parent Id to that element in this context attribute as below.
folderContentElement.setPath(folderContentElement.getPath()"/"folderContentElement.getParentId);
So whenever you want the path of particular tree node element, just call the getter method of Path attribute.
It gives you the complete path.
SAP>SDN>Forums-->Thread..etc..
Regards,
Charan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Armin,
I gone through the below thread
List path = new ArrayList();
IWDNodeElement e = wdContext.node<TreeDataSource>().getTreeSelection();
while (e != null)
{
path.add(0, e);
e = e.node().getParentElement();
}
If i use this code . it will go to the infinite loop and server is getting stopped. any other solutions??
Regards,
Manivannan P
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.