Extjs: changing node value

I am sure it is really simple, but I can not find it anywhere!

All I'm trying to do is change the display value of the node tree. I thought tree.getNodeById (myNode) .text = 'HHHHH'; or tree.getNodeById (myNode) .value = 'HHHHH'; would do the trick, but I get nothing. What am I missing?

thanks

Craig

+4
source share
2 answers

It:

tree.getNodeById(myNode).setText('HHHHH'); 
+2
source

For some reason in Extjs 4.0.7 this is the only thing that worked for me:

 var node = selected_node.appendChild({ leaf: true, text: "My Text" //doesn't work }); node.set( "text", "My Text" ); //works 
+2
source

All Articles