The extjs 4 tree panel uses the record properties id & text by default for the nodes of the tree.
Is there any way to change it to some different property names?
There’s a way to specify the root element but I can’t see any config setting for those properties.
You can use the displayField config for treePanel, in the extjs api they say it;s a boolean value with default value text… That’s just wrong :P, actualy you can put something like displayField: ‘name’ and it will show the name field from the store. But i don’t think you can change the id property.
If you want to change the id property you can use the mapping config on the model fields and let the treePanel configs as they are. something like
Edit As Ben suggested you can change the property names of a tree panel by using the
displayFieldconfig for the tree panel and theidPropertyfor the model of the treeStore.