【发布时间】:2009-10-07 18:36:53
【问题描述】:
如何更改树节点的属性?
一个树节点具有以下属性:
{"id":"75",
"description":"My Tree Node",
"status":"25"
"uiProvider":"col",
"leaf":true}
现在我的脚本收到以下数据
{
"id":"75",
"status":"100",
"cls":"done"
}
我尝试更新属性(已更新):
// a.result.data has the new data and taskID is the node's id
for (var property in a.result.data)
{
tree.getNodeById(taskID).attributes[property] = a.result.data[property];
}
但是,树没有更新。
如何让树显示更改? 我需要节点来更改现有属性并添加新属性。
感谢您的帮助!
【问题讨论】:
-
a.result.data.property 可能是访问它的不好方法.. 未定义
标签: javascript extjs