方法1:
var txtt = new Ext.form.TextField({
//xtype:'textfield',
enableKeyEvents:true,
fieldLabel:'产品',
readOnly:true,
id:'order_productName',
name:'order_productName',
allowBlank:false,
blankText:'产品分类不能为空',
emptyText:'点击选择产品分类'
});
Ext.getCmp('order_productName').on('focus',function(thi,e){alert();
});
//一种查找表单内字段的方法
//form.getForm().findFiled(''order_productName'');
方法2:
xtype:'textfield',
fieldLabel:'产品',
readOnly:true,
id:'order_productName',
name:'order_productName',
allowBlank:false,
blankText:'产品分类不能为空',
emptyText:'点击选择产品分类',
listeners:{
'focus':function(){alert();
product_Tree_Window.show();
}
}