Skip to Content
author's profile photo Former Member
Former Member

TreeView not showing child nodes

I've created a component to display a tree view of some information returned from an EJB. In the wdDoInit of the controller, I populate the first set of nodes as follows:

loadChildren(wdContext.nodePreference(), 0);

The '0' signifies the root node of the tree. The loadChildren() method looks as follows:

void loadChildren(IPublicTreeComp.IPreferenceNode node, int nodeId) {		
  NodeInfo[] nodes = getNodes(nodeId);
  for (int i = 0; i < nodes.length; ++i) {
    IPreferenceElement elt = node.createPreferenceElement();
    elt.setNodeId(nodes<i>.getNodeId());
    elt.setNodeName(nodes<i>.getNodeName());
    elt.setHasChildren(nodes<i>.isFolderNode());
    elt.setExpanded(false);
    node.addElement(elt);
  }
}

In the view component, the loadChildren action is tied to this code:

wdThis.wdGetTreeCompController().loadChildrenForNode(element.mappedPreferenceElement());

And finally, loadChildrenForNode() is defined as follows:

public void loadChildrenForNode( ca.huskyenergy.glob.prefs.editor.wdp.IPublicTreeComp.IPreferenceElement element )
  {
    //@@begin loadChildrenForNode()
    loadChildren(element.nodeChild(), element.getNodeId());
    //@@end
  }

All the methods are invoked when they should be - I can see that the correct data is being fetched and stored into the context, but other than the top two tree nodes, no other nodes are displayed when the root nodes are expanded.

What am I missing?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Jan 10, 2007 at 05:28 PM

    Apologies, wrong thread. I've posted this in the correct forum.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.