给tbar 文本框添加 回车事件
tbar: ['账户:',{
xtype: 'textfield',
id:'OLoginName',
width:100,
name: 'qLoginName'},
{id:'empImage',
name:'empImage',
text:'查询',
handler:function(){
var qLoginName = Ext.getCmp('OLoginName').getValue();
Ext.getCmp("radioAccountGrid").getStore().baseParams = {loginName:qLoginName} ;
Ext.getCmp('radioAccountGrid').getStore().load({
params:{
start:0,
limit:radioAccount.rowLimit
}
});
}}
]
//给属性添加回车事件
var map = new Ext.KeyMap("OLoginName", {
key: 13,
fn: function(){
var qLoginName = Ext.getCmp('OLoginName').getValue();
Ext.getCmp("radioAccountGrid").getStore().baseParams = {} ;
Ext.getCmp('radioAccountGrid').getStore().load({
params:{
start:0,
limit:radioAccount.rowLimit,
loginName:qLoginName
}
});
}
});
把select 内容 加载到 input域中
Ext.onReady(function(){
var store = [
['台', '台'],
['套', '套'],
['个', '个'],
['支', '支'],
['本', '本'],
['盒', '盒'],
['节', '节']
]
var combo = new Ext.form.ComboBox({
store: store,
displayField:'state',
typeAhead: true,
mode: 'local',
id:'inputId',
applyTo: 'inputId',
hiddenId :'aobc',
editable :true,
forceSelection: false,
triggerAction: 'all',
emptyText:'',
selectOnFocus:false,
inputType :'text'
});
}
);
<input id="inputId" name="inputName" value='${inputForm.inputName}" >