PDA

View Full Version : Tree reader idProperty is ignored



AndreKR
25 May 2011, 7:46 PM
When I configure a tree...



xtype: 'treepanel',
rootVisible: false,
store: {
proxy: {
type: 'direct',
directFn: tree.get_lines,
paramOrder: ['node'], // nodeParam is "node" by default
reader: {
type: 'json',
root: 'children', // redundant
idProperty: 'line_id',

...


...and load the root node from this JSON...



{
"children":[
{"line_id":1, "name":"foo", "id":"dont_look_here"},
{"line_id":2, "name":"bar", "id":"really, no"},
]
}


...when I then expand the foo node, get_lines() is called with "dont_look_here" as parameter. If I omit the id property in the JSON, get_lines() is called with "" as parameter.