給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}" >