想要在rallycombobox中显示所有的portfolioitem / program,但它没有显示

时间:2015-01-29 14:36:02

标签: extjs extjs4 rally

想在rallycombobox中显示所有的portfolioitem / program,但它没有显示任何

                this.down('#filter_box').add({
                    xtype: 'rallyfieldvaluecombobox',
                    model: 'portfolioitem/program',
                    field: 'Name',
                    //margin: '0 0 5 0',
                    autoLoad: true,
                    fieldLabel: 'Program',
                    itemId: 'program',
                    multiple: true,
                    stateful: true,
                    stateId: 'chart-state1',
                    stateEvents: ['change', 'select'],                      
                    displayField: 'Name',
                    valueField: 'FormattedID',
                    listeners:{
                        ready: function(combobox){
                            this.programs = this.down('#program').getValue();
                            //this.validateReady();                             
                        },
                        select: function(selectedRecord) {

1 个答案:

答案 0 :(得分:1)

rallyfieldvaluecombobox用于显示字段的允许值。如果要使用portfoilioitems填充组合框,请使用rallycombobox

Ext.define('CustomApp', {
    extend: 'Rally.app.App',
    componentCls: 'app',
    items:{ html:'<a href="https://help.rallydev.com/apps/2.0/doc/">App SDK 2.0 Docs</a>'},
    launch: function() {
        this.add({
            xtype: 'rallycombobox',
            itemId: 'features',
        storeConfig: {
        model: 'PortfolioItem/Feature',
        fetch: ['FormattedID','Name','Release', 'UserStories'],
        limit: Infinity,
        autoLoad: true
        },
        fieldLabel: 'select Feature',
        listeners:{
                ready: function(combobox){
            this._onFeatureSelected(combobox.getRecord());

        },
                select: function(combobox){
            this._onFeatureSelected(combobox.getRecord());        
                },
                scope: this
            }
        });
    },
    _onFeatureSelected:function(record){
        console.log(record.get("Name"), record.get("FormattedID"));
    }
});

enter image description here

相关问题