on 03-11-2008 7:02 AM
hai all,
iam using tree UI element.I need to load the root node alone first.Then when the user selects the root node the selected value needs to be passed to database and the output from database should be loaded as child node of that particular parent.
iam getting the selected value of using in leadselect of table and passing that i get the output from database.
ALL I NEED is to know how to add these values under the corresponding root node.Its very urgent plz help me in this issue.any help ll be greatly appreciated.
Thanks n Regards
Sharanya.R
Hi,
If your context structure is as follows
Root (Node)
Child (Recursive Node)
ID (Attribute
Now lets assume that you have the selected element in a variable called "selectedElement"
of type NodeElement
try {
//Following line gives you the selected element
IRootElement nodeElement = (IRootElement)wdContext.nodeRoot().getTreeSelection();
//Adding childrens to the selected one
IRootElement child = nodeElement.nodeChild().createAndAddRootElement();
child.setID("Test");
} catch (WDContextException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Regards
Ayyapparaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
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.