Extjs4快速查找组件的方法

译自:http://docs.sencha.com/extjs/4.2.0/#!/api/Ext.ComponentQuery

代码1:



                    var win = Ext.widget('remarkWin');
                    win.show();
                    var fxry = win.down('textfield[name=xm]');
                    console.dir(fxry);
                    console.dir(fxry.getValue());
                   

代码2:

/**
 * 矫正管理-综合报到-人机配置-备注信息窗口
 */
Ext.define('cdkj.view.manage.allocation.RemarkWin', {
extend : 'Ext.Window',
alias : 'widget.remarkWin',
title: '备注信息' ,
layout: 'fit' ,
width: 350 ,
height:250 ,
resizable: false ,
buttonAlign: 'right' ,

items : {
xtype : "form",
margin : 10,
border : 0,
// labelWidth : 90,

items: [{
xtype : 'textfield',
// width : 310,
labelWidth : 60,
anchor:"100%",
// valueField : 'pk_id',
// displayField : 'cname',
fieldLabel : '服刑人员',
editable : false,
allowBlank : false,
name:'xm',
// shadow : false,
// mode : 'local',
forceSelection : true,
// triggerAction : 'all',
// typeAhead : true,
readOnly:true
}, {
columnWidth: .3 ,
layout: 'form' ,
border: false ,
items: [{
xtype: 'textarea' ,
id: 'remarksss' ,
name: 'remarksss' ,
fieldLabel: '备      注' ,
allowBlank: false ,
blankText: '备注信息不能为空!' ,
anchor: '98%',
height:110,
labelWidth : 60,
}]
}]
},
buttons : [
      {id : 'remarkSave',text : "保存",action : 'bind'},
      {id :'remarkClose',text : '关闭',action : 'colse',
      handler : function(btn){
      btn.up('window').close();
      }
      }
]
})


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值