开发者

Custom ColumnTree node attributes

By default, ColumnTree uses these attributes for the nodes: text, id, leaf. So, the server sould sends something like

{
    id: 1,
    text: 'A leaf Node',
    leaf: true
}

What should i change in the ColumnTree options if my server sends custom params开发者_StackOverflow中文版? Like:

{
    n: 1,
    folder: 'A leaf Node',
    leaf: true
}


You can override the method createNode and assemble your own attributes hash from the data you received from the server. Check the example in the docs of Ext.tree.TreeLoader.createNode

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜