PDA

View Full Version : Ext.data.TreeStore change root name?



mmuruev
6 Sep 2012, 1:54 AM
Is this possible change name root for Ext.data.TreeStore. I trying use it for linux file brousing and root dir in it / but from client I have request like /<controller>/root

Ext.create('Ext.data.TreeStore', { proxy:{
type:'rest',
url:'fileManager',
api:{
read:'read',
create:'create',
update:'update',
destroy:'delete'
},
reader:{
type:'json',
root:'data'
},
writer:{
type:'json'
}
}

tvanzoelen
6 Sep 2012, 5:00 AM
tree.getRootNode() gives you the NodeInterface.

You can change the text of that node. But maybe you mean something else.