checkbox - Rally SDK 2.00 p2 添加几个复选框

标签 checkbox rally

我正在尝试为 Rally Report 版本 2.00p2 添加复选框。

我为过滤器定义了几个占位符(releaseFilter 和 stateFilter) 并在 onReady 函数主体的最后添加复选框。

但是,我得到的是 1 个不同的复选框,而不是 5 个不同的复选框,位于发布过滤器的顶部。 抱歉,我无法添加图像。

Rally.onReady(function() {

      Ext.define('CustomApp', {
            extend: 'Rally.app.App',
            componentCls: 'app',


        autoScroll: 'true',
            items: [
                {
                    xtype: 'container',
                    itemId: 'releaseFilter',
                    style: {
                        margin: '5px'
                        }
                },
                {
                    xtype: 'container',
                    itemId: 'stateFilter',
                    style: {
                        margin: '5px'
                        }
                },
                {
                    xtype: 'container',
                    itemId: 'grid',
                    style: {
                        margin: '10px',
                        }
                },
                // SOME CODE
        ],
            launch: function() {
                Rally.data.ModelFactory.getModel({
                    type: 'UserStory',
                    success: function(model) {
                        this.grid = this.add({
                            xtype: 'rallygrid',
                            model: model,
                            columnCfgs: [
                                'FormattedID',
                                'Release',
                                'Iteration',
                                'PlanEstimate',
                                'PlanDevEstDays',
                                'PlanQAEstDays'
                            ],
                            storeConfig: {
                                filters: [
                                    {
                                        property: 'ScheduleState',
                                        operator: '=',
                                        value: 'Accepted'
                                    }
                                ]
                            }
                        });
                    this.down('#releaseFilter').add(
                    {
            xtype: 'rallyreleasecombobox'                           
        }
                );

                this.down('#stateFilter').add([{
                        xtype: 'menucheckitem',
                                                    text: 'Backlog',
                                                    floating: 'false'
                    },{
                        xtype: 'menucheckitem',
                                                    text: 'Defined'
                    },{
                        xtype: 'menucheckitem',
                                                    text: 'In-Progress'
                    },{
                        xtype: 'menucheckitem',
                                                    text: 'Completed'
                    },{
                        xtype: 'menucheckitem',
                                                    text: 'Accepted'
                    }]
                );


                    },
                    scope: this
                });
            }
       });


        Rally.launchApp('CustomApp', {
            name: 'Grid Example'
        });
    });                    

javadoc 中的原始条目是:

Ext.create('Ext.menu.Menu', {
width: 100,
height: 110,
floating: false,  // usually you want this set to True (default)
renderTo: Ext.getBody(),  // usually rendered by it's containing component
items: [{
    xtype: 'menucheckitem',
    text: 'select all'
 },{
    xtype: 'menucheckitem',
    text: 'select specific',
 },{
    iconCls: 'add16',
    text: 'icon item'
 },{
    text: 'regular item'
 }]
});

我做错了什么?

最佳答案

不要使用 menucheckitem,而是使用标准的 Ext 复选框。像这样:

this.down('#stateFilter').add([{
        xtype: 'checkbox',
        fieldLabel: 'Backlog'
    },
    ...
]);

请务必将其从 text 更改为 fieldLabel

关于checkbox - Rally SDK 2.00 p2 添加几个复选框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12243848/

相关文章:

android - 自定义 ListView (复选框问题)...setOnCheckedChangeListener

c# - 使用 Rally REST API,如何查询并返回一个*完整*的 JSON 对象?

java - 尝试使用 Rally Java 工具包更新用户故事时出现 "Could not update: Could not write changes in Unit Of Work"错误

java - 使用 Rally Java API 更新带有标签的 TestCase 时出错

jQuery - 如何使用 Each() 方法循环并更改页面加载上的所有复选框

javascript - 检查复选框 :check is not working, 为什么,jquery?

php - 如何确定是否使用 PHP 选中了复选框?

android如何在右侧设置复选框图标?

javascript - 每个团队的缺陷和严重程度,缺陷计数不正确

javascript - Rally 自定义应用程序复选框过滤器不起作用