init: function() {
this.control({
'userlist textfield[id=searchId]':{
keyup:function(textfield, e){
if (e.getKey() == 13) {
this.searchUserByEnter //此处该如何调用searchUserByEnter 所标记的方法
}
}
}
}
searchUserByEnter:function(textfield){
alert('call search function')
var grid = textfield.ownerCt.ownerCt,
store =grid.getStore(),
tbar=textfield.ownerCt,
searchInfo= tbar.down('textfield').getValue();
store.on('beforeload', function (store, options) {
var param = {
param:searchInfo
};
Ext.apply(store.proxy.extraParams, param);
});
var pagebar = grid.down('pagingtoolbar');
pagebar.movePrevious();
grid.getStore().load({
params:{ start:0, limit:5}
});
}
眼眸繁星