on 05-13-2008 1:16 AM
Hi
I have populated a Tree . Need to know which level the particular element is in.
Hope I am clear
for ex I have a tree
Continent
North America
USA
Canada
Europe
London
France
I need to know that North America, Europe is in 2nd Level and USA,CANADA,LONDON,FRANCE are in 3rd level.
is there a way to know.
Thank you
Regards
Krishna Kanth
If you have a recursive context structure, you can climb up using the IWDNode.getParentElement() API until you reach the root node of the tree.
If you have a non-recursive context structure like
Continents
-- Countries
---- Cities
you can just check the type of node element to find out where you are, e.g.
IWDNodeElement selectedTreeNode = dataSourceNode.getTreeSelection();
if (selectedTreeNode instanceof ICountriesElement)
{
/* a country is selected */
}
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Armin
Thank you For the Answer.
My Problem is I have a Folder-File Structure like
--Folder1
--- Folder 2
-
File2
-
Folder3
-
File3
File1
So Instead of Using Tree UI Element in Webdynpro. I am trying to show Folders as text View Element and Files as Link to Action.
So I need to know that File 3 in above example happens to be at 4th Level and File2 and Folder3 are in 3rd Level. So that I can adjust the spacing .
Could you please advice.
Thank you
Regards
Krishna kanth
Edited by: siddi siddi on May 14, 2008 4:37 PM
Edited by: siddi siddi on May 14, 2008 4:41 PM
Hi Armin
With the requirement the Tree UI Element is not giving satisfying Look and feel and I need to
develop those text views and Link to Actions.
I am not doing anything on action of folder and all. I have already developed tree and all.
The Thing is I am building my UI Controls in a recursive function. So I need to know at what level the particular element is being placed so that I can adjust the padding left accordingly.
Thank you
Regards
Krishna Kanth
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.