View Full Version : TreePanel : Adding Nodes Back-To-Back

1 Aug 2012, 11:54 AM

In ExtJS 4.1, I am adding a new node using appendChild(). That new node is created in the tree and eventually makes it back to ExtDirect with a new id for that new node. But that id never gets assigned to that node. Is that an automatic process or do I need to call newNode.set('id,',myNewId) somewhere?

When I immediately add another node to the last new node, the whole thing breaks down because there is no parentId.


1 Aug 2012, 1:38 PM
Nevermind, I figured it out. I was returning a single node object from the server, then just the id. Neither of those worked.

I just had to make the JSON response from the server to be the same structure as the when the tree first loads. In other words, a 'children' array containing the single new node.