如何在RallyApps SDK2中扩展Rally.ui.tree.Tree的所有项目?

时间:2012-11-29 23:00:39

标签: rally

我正在使用Tree小部件来使我们的TestPlan中的所有内容更易于访问。我希望在树中加载和扩展所有子文件夹和测试用例。这是一个缓慢的初始加载,但可以很容易地找到您正在寻找的需求,并在我们的文件夹层次结构的上下文中查看它(我们在33个文件夹中有3000个测试用例)。

如何递归展开所有文件夹?

1 个答案:

答案 0 :(得分:2)

如果您将树项目配置为默认展开,则应自动展开。 http://developer.rallydev.com/apps/2.0p5/doc/#!/api/Rally.ui.tree.TreeItem-cfg-expanded

Ext.create('Ext.Container', {
     items: [{
         xtype: 'rallytree',
         treeItemConfigForRecordFn: function(record){
             return {
                 xtype: 'rallytreeitem',
                 expanded: true
             };
         }
     }],
     renderTo: Ext.getBody().dom
 });