}, {
xtype: 'textfield',
fieldLabel: '备注',
id:'STAFF_MEMO',
name: 'staff.memo'
}, {
xtype: 'textfield',
fieldLabel: '员工编号',
readOnly:true,
id:'STAFF_CODE',
name: 'staff.staffCode'
}, {
xtype: 'textfield',
fieldLabel: '员工职务',
id:'STAFF_JOB',
name: 'staff.staffJob'
}, {
xtype: 'textfield',
fieldLabel: '借调开始',
id:'BORROW_START_TIME',
name: 'staff.borrowStartTime'
}, {
xtype: 'hidden',
id:'PICTURE_URL',
name: 'staff.pictureUrl'
},{
xtype: 'textarea',
fieldLabel: '借调备注1',
id:'BORROW_MEMO1',
name: 'staff.borrowMemo1'
}]
}, {
columnWidth: .5,
layout: 'form',
defaults: {
width: 200
},
items: [{
id: 'IDSBPictures',
name: 'nameSBPictures',
fieldLabel: '个人照片',
xtype: 'box', //或者xtype: 'component',
width: 110, //图片宽度
height: 150, //图片高度
autoEl: {
tag: 'img' //指定为img标签
}
}, 动态改变IDSBPictures的src值
var _PICTURE_URL = Ext.getCmp("PICTURE_URL").getValue();
Ext.getCmp("IDSBPictures").getEl().dom.src = _PICTURE_URL;
取textfield的值可以用Ext.getCmp(id).getValue();
var value="**";
(1) fs.form.findField(id/name).setValue(value);
(2) Ext.get(id/name).setValue(value);
(3) Ext.getCmp(id).setValue(value);
1)Ext.getCmp('id');
2)FormPanel.getForm().findField('id/name');
3)Ext.get('id/name');//前提是FormPanel在界面上显示出 来了
隐藏
hidden: true,
hideLabel:true