dhtmlxTree editing nodes

I am trying to edit the name of a node on my dhtmlxTree. My problem is that I am unable to capture the new name that I enter.

How can I pass that name in the edit function? Is the name taken by the value parameter in onEdit( state, id, tree, value ) ? The value arguments is undefined when I pass it back to my java code.

does onEdit return the newly entered name? If so, should it called recursively in the edNodeFunction as in my code below?

Here’s my code:


tree.attachEvent(“onEdit”, );


function edNodeFunction( nodeId ){    






In common case, if you know node ID then you can get it value as

In case of onEdit event you can get value as
       if (stage == 2) {
          alert("new value = "+value)
       return true;