简体   繁体   English

如何从迭代组合框中获取所有项目

[英]how do I get all items from a iteration combobox

I used to use getItems get all items in a dropdownList. 我曾经使用getItems获取dropdownList中的所有项目。 http://developer.rallydev.com/developer/iteration-dropdown http://developer.rallydev.com/developer/iteration-dropdown

but in the API 2.0 I can't find equivalent function to get all items from the iterations combobox. 但是在API 2.0中,我找不到从迭代组合框中获取所有项目的等效函数。

Any idea? 任何想法?

another issue: 另一个问题:

Using getRawValue returns only the iteration name, how could I get also the iteration start date and end date? 使用getRawValue仅返回迭代名称,如何获得迭代的开始日期和结束日期?

To get all items for the iteration combobox, you will need to get the store associated with the combobox. 要获取迭代组合框的所有项目,您需要获取与组合框关联的商店。 The code below adds a listener to the store load and then returns all the records associated with that store. 下面的代码将一个侦听器添加到商店负载中,然后返回与该商店关联的所有记录。

Once you have a record, you can retrieve a value for a field using the get method and passing in the field name. 获得记录后,您可以使用get方法并传入字段名称来检索字段的值。

Ext.create('Ext.Container', {
    items: [{
        xtype: 'rallyiterationcombobox',
        storeConfig: {
            listeners: {
                 load: function(store, records){
                    console.log(records);
                }
            }
        },
        listeners: {
            select: function(combobox) {
                console.log(combobox.getRecord().get("StartDate"));
                console.log(combobox.getRecord().get("EndDate"));
            }    
        }    
    }],
    renderTo: Ext.getBody().dom
});

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM