on 2004 Jan 16 4:02 PM
Hi!
I'm currently programming a Web Dynpro application that uses a dynamically
populated tree control. At the beginning the tree has only one child node (root).
When clicking on this node the child nodes for this node are created dynamically.
When clicking on the newly created child nodes, there will be nodes inserted
as child of these nodes (and so on).
While in my application the needed information for creating the new child nodes
is retrieved from SAP R/3 via BAPIs, in the demo application I insert always five
child nodes (labeled "Dyn node 0-4").
Here is a short description of my demo application:
Context:
ValueNode (RecTree)
- ValueAttr (text)
- RecNode (RecChild)
wdDoInit():
IRecTreeElement first = wdContext.createRecTreeElement();
first.setText("Root");
wdContext.nodeRecTree().addElement(first);
onActionNodeClick(): // EventHandler called when clicked on a node
// get the currently selected node
IRecTreeElement current = null;
for (current = wdContext.currentRecTreeElement();
current.currentRecChildElement() != null;
current = current.currentRecChildElement());
IRecTreeNode curNode = current.nodeRecChild();
for(int i=0; i<5; ++i)
{
IRecTreeElement dynElem = curNode.createRecTreeElement();
dynElem.setText("Dyn node " + i);
curNode.addElement(dynElem);
}
By clicking on a node (to fill in new childs), expanding it, clicking on one
of the newly created childs, expanding it, ... I'm able to create only two
new levels of child nodes. What do I have to do if I need more levels of
dynamically created child nodes?
When population the tree in the wdDoInit()-method there is no such
limitation for the depth of the tree, but I need to do this part dynamically ;-(.
I hope there is a solution for this problem...
Best regards
Thomas
Hi Thomas,
I guess you have already seen the post within this forum "Use Tree Recursive in web dynpro" where I described the demo application...
Need to talk to the developers!
Best regards, Karin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Karin,
you are totally right - I did see this coding example, but it doesn't
help in my case.
Like I described, all works perfectly fine when filling the tree
in "wdDoInit()", but filling the tree elsewhere is limited to two new
levels of child nodes...
Hope there will soon be a solution.
By the way, did you get my e-mail?
Best regards, Thomas
Hi Thomas,
Thank you! I have seen your e-mail. Please give me a couple of days to response!
Regarding the post:
We just rebuild the project you described and it works perfectly fine with the current version of Web Dynpro. I can easily load data for several levels; I'm not limited to 2 new levels. So it seems that your version of Web Dynpro still contains a bug that caused the lead selection to be set incorrectly when clicked on a node - causing your program logic to return the wrong current TreeElement. I'm afraid there is no work-around within your version. Sorry for the inconvenience...
'The next Sneak Preview version should solve this issue...
Best regards, Karin
Hi Karin,
should have guessed that it might be another version problem...
But I think it has nothing to do with the lead selection:
After navigation through the tree to the currently selected
node, I displayed the statistics of this node in another area.
Therefore I can say that it was the correct node I tried to
add the new childs to. When adding the new child nodes to
this node, there was no effect (and no exception either).
Nevertheless I wish to thank you for your reconstruction
of the problem with the current version.
Best regards, Thomas
User | Count |
---|---|
70 | |
10 | |
10 | |
7 | |
6 | |
6 | |
6 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.