ExtJS TextField Enter Key After Click External Button

Я хочу вызвать нажатие кнопки в текстовом поле, введите функцию.

items: [
{
    xtype: 'form',
    id: 'myForm',
    items: [
    {
        xtype: 'textfield',
        id: 'myTextField',
        listeners: {
            specialkey: function(f,e){
                if(e.getKey() == e.ENTER){
                    console.log('Spacial Key = Enter'); // It's working
                    // But i wanna click btnSearch button click event
            }
            }
        }
    }
    ],
    buttons: [
        {
            text: 'Search',
            id: 'btnSearch',
            handlers: function(){
                // bla bla
                // bla bla
                //...
            }
        }
    ]
}
]

var myform = Ext.getCmp('myForm');
myForm.getForm().submit()

Работает, но функция btnSubmit.click не работает.

7
задан Explosion Pills 1 February 2013 в 06:13
поделиться