一个是 combo 另一个是 panel或者textfield
当 选择 combo 时 从后台获得数据 显示在 panel或者textfield中 在这基础上改
var openzzfhOpenzzfhForm = new Ext.form.FormPanel({
id:'openzzfhOpenzzfhForm',
frame: true,
layout: 'form',
labelAlign:'right',
url: path + "/openzzfhManageCon.do",
items:[{
name: 'addczzhzh',
width: 300,
fieldLabel: '归属财政专户',
id: 'iaddczzhzh',
hiddenName: 'haddczzhzh',
xtype: 'combo',
typeAhead: true,
editable:false,
triggerAction : 'all',
selectOnFocus:true,
forceSelection: true,
mode: 'local',
store: czzhzhdsInfoStore,
displayField: 'zh',
valueField: 'hm',
listeners : {
specialkey : function(f, e) {
if (e.getKey() == e.ENTER || e.getKey() == 40 ) {
openzzfhOpenzzfhForm.getForm().findField('addsjzhflag').focus(true,true);
}
},
select : function(combo,record,index) {
<!-- 当发生选择事件的时候 就从后台获得数据 显示到下面的panel元素中 -->
}
}
},{
name: 'addzh',
width: 100,
fieldLabel: zhncStore,
xtype: 'panel'
}]
})
当 选择 combo 时 从后台获得数据 显示在 panel或者textfield中 在这基础上改
var openzzfhOpenzzfhForm = new Ext.form.FormPanel({
id:'openzzfhOpenzzfhForm',
frame: true,
layout: 'form',
labelAlign:'right',
url: path + "/openzzfhManageCon.do",
items:[{
name: 'addczzhzh',
width: 300,
fieldLabel: '归属财政专户',
id: 'iaddczzhzh',
hiddenName: 'haddczzhzh',
xtype: 'combo',
typeAhead: true,
editable:false,
triggerAction : 'all',
selectOnFocus:true,
forceSelection: true,
mode: 'local',
store: czzhzhdsInfoStore,
displayField: 'zh',
valueField: 'hm',
listeners : {
specialkey : function(f, e) {
if (e.getKey() == e.ENTER || e.getKey() == 40 ) {
openzzfhOpenzzfhForm.getForm().findField('addsjzhflag').focus(true,true);
}
},
select : function(combo,record,index) {
<!-- 当发生选择事件的时候 就从后台获得数据 显示到下面的panel元素中 -->
}
}
},{
name: 'addzh',
width: 100,
fieldLabel: zhncStore,
xtype: 'panel'
}]
})
解决方案 »
- 弱弱的问个问题
- 如何利用DOM解析表格里面的内容?
- disabled和onmouseover的问题,送分了!!!
- 页面包含iframe后,浏览器进度条一直loading
- jquery ui tabs 显示问题
- 大牛在哪里???关于动态生成<input type="file">的问题。
- dojo parserAutoRequire 加载模块在ie不能执行页面内定义的方法及事件
- 求在表单的提交按钮按下后使其失效的完整代码或者请请帮助修改我写好的代码段
- 怎样改变表单内容?在线等!!
- 再问秋水无恨://这种写法不对,该怎样写???<form name=form1 method=post action='form123.php'>document.all(i).src = 'yes.gif';
- ajax的问题
- 银行系统难道非ie不可??百思不得其解
我想基本思路的panel弄个datastore,在combo的select函数里给datastore设值,然后再调datastore或panel的refresh方法。但我没有弄出来
解决了
捕获选择事件 .. 然后
select : function(combo,record,index) {
//这句是给表单元素赋值
myForm.getForm().setValues( { '要赋值的表单元素' : 值 } );
}