Радиогруппа и fireEvent - PullRequest
       2

Радиогруппа и fireEvent

0 голосов
/ 04 мая 2011

У меня есть простой класс RadioGroup:

TestRadioGroup = Ext.extend ( Ext.form.RadioGroup, {
        fieldLabel: '<b>Test</b>',
        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')
для элемента этого inputValue 1. Как это сделать?

1 Ответ

2 голосов
/ 04 мая 2011

Возможно, что-то в этом роде

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