RadioGroup和fireEvent

时间:2011-05-04 15:27:09

标签: extjs extjs4

我有一个简单的RadioGroup类:

TestRadioGroup = Ext.extend ( Ext.form.RadioGroup, {
        fieldLabel: 'Test',
        listeners: {
            change: function(el,val) {
                alert(val);
            }
        },
        constructor: function(config) {
            this.items = [];
            this.items.push ( {boxLabel: 'Test1', name: 'test', inputValue: 2 } );
            this.items.push ( {boxLabel: 'Test2', name: 'test', inputValue: 1 } );
            this.items.push ( {boxLabel: 'Test',name: 'test', inputValue: 0  }  );
//          fireEvent('change')
            TestRadioGroup.superclass.constructor.call(this);
        }
});

我想

fireEvent('change')
了解itemValue 1.如何做?

1 个答案:

答案 0 :(得分:2)

可能是那样的

TestRadioGroup.fireEvent('change', TestRadioGroup, checkedRadioObj)