cancel
Showing results for 
Search instead for 
Did you mean: 

TreeView not showing child nodes

Former Member
0 Kudos

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?

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

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