我在extjs中创建了向导.在表格中我有2个字段,我需要当用户填写最后一个文本字段时按下Enter该操作应该在用户按下下一个按钮时执行.如何实现它
{
xtype:'textfield',
name:'whatever',
enableKeyEvents: true,
listeners: {
keypress : function(textfield,eo){
if (eo.getCharCode() == Ext.EventObject.ENTER) {
//enter is pressed call the next buttons handler function here.
this.up('form').down('nextButton').handler
}
}
}
}
Run Code Online (Sandbox Code Playgroud)