https://help.rallydev.com/apps/2.1/doc/#!/example/simple-tree-grid
在上面链接的简单树形网格示例中,我添加了控制台日志以打印根节点,但它始终以null的形式出现,即使加载了用户故事。
我也遇到了 store.getTopLevelNodes() 的异常
有人可以解释一下吗?
////代码
_onStoreBuilt: function(store) {
console.log('root node ', store.getRootNode());
console.log('_getStoreTypePaths ', store._getStoreTypePaths());
console.log('getTotalCount ', store.getTotalCount());
console.log('getTopLevelNodes ', store.getTopLevelNodes());
this.add({...
///例外
root node null
_getStoreTypePaths (4) ["hierarchicalrequirement", "defect", "task", "testcase"]
getTotalCount undefined
sdk.js:65 Error: success callback for Deferred transformed result of Deferred transformed result of Deferred transformed result of Deferred threw: TypeError: Cannot read property 'childNodes' of null
at constructor._treeWalkingEach (VM900 sdk.js:formatted:98557)
at constructor.each (VM900 sdk.js:formatted:98554)
at constructor.getTopLevelNodes (VM900 sdk.js:formatted:98292)
at constructor._onStoreBuilt ()
at VM900 sdk.js:formatted:67457
at constructor.notify (VM900 sdk.js:formatted:67506)
at constructor.register (VM900 sdk.js:formatted:67492)
at constructor.then (VM900 sdk.js:formatted:67391)
at constructor.then (VM900 sdk.js:formatted:67330)