EXTJS 4.2 资料 控件之checkboxgroup的用法(静态数据)

1.页面
1.1点击‘横幅’,需要动态显示隐藏文本框
{
xtype: 'fieldset', title: '指定附加图&横幅设置', collapsible: true,
items: [
{
xtype: 'container',
layout: 'hbox',
flex: 1,
items: [{
xtype: 'checkboxgroup',
fieldLabel: '指定附加图',
width: 100, flex: 1,
columns: 1,
vertical: true,
id: 'picType',
items: [
{ boxLabel: '略图', name: 'thumbed', inputValue: 'thumb', checked: true },
{ boxLabel: '图标', name: 'iconed', inputValue: 'icon', },
{
boxLabel: '横幅', name: 'bannered', inputValue: 'banner', listeners: {
change: function (cb, nv, ov) {
if (cb.getValue() == true) {
Ext.getCmp('banner').show();
}
else {
Ext.getCmp('banner').hide();
}
}
}
}
]
}
]
}, {
xtype: 'container',
id: 'banner',
hidden: true,
flex: 1,
layout: 'anchor',
defaultType: 'textfield',
items: [{
fieldLabel: '宽',
afterLabelTextTpl: required,
allowBlank: false,
name: 'BannerWidth',
anchor: '50%'
}, {
fieldLabel: '高',
afterLabelTextTpl: required,
allowBlank: false,
name: 'BannerHeight',
anchor: '50%'
}]
}
]
},
2.取值
//----------------获取选中是否true、false 开始-----------------
var thumbed = dataViewPanel_Right.form.findField('thumbed').getValue();//获取选中是否true、false
var iconed = dataViewPanel_Right.form.findField('iconed').getValue();//获取选中是否true、false
var bannered = dataViewPanel_Right.form.findField('bannered').getValue();//获取选中是否true、false
//----------------获取选中是否true、false 结束----------------- //----------------获取选中的checkbox值 开始-----------------
var chkLableValue = Ext.getCmp('picType').getChecked();
var lblValue = [];
Ext.Array.each(chkLableValue, function (item) {
lblValue.push(item.inputValue);
});
//----------------获取选中的checkbox值 结束-----------------
alert(lblValue);
EXTJS 4.2 资料 控件之checkboxgroup的用法(静态数据)的更多相关文章
- EXTJS 4.2 资料 控件之checkboxgroup的用法(动态数据)
在开发中遇到两种情况:第一在新增窗体时,要动态加载CheckBox项:第二在修改时不但需要加载所有CheckBox项,还要并且选中之前新增时的选项 如图这是在修改页面的效果: 1.在新增窗体中动态加载 ...
- EXTJS 4.2 资料 控件之radiogroup 的用法
最近在EXTJS4.2开发项目,radiogroup的用法,主要是和grid之间的编辑功能:看了好多资料都不对,特此在这里备注记录 代码如下, 1.这是一段Win窗体上的两个单选按钮,设置单选按钮都是 ...
- EXTJS 3.0 资料 控件之 html 潜入label用法
这是在Extjs 中插入html 控件label! html: "<div><label id='howMany'>您共选中了</label><br ...
- EXTJS 3.0 资料 控件之 combo 用法
EXTJS combo 控件: 1.先定义store //年款 var comboData_ReleasYear = [ ['], ['], ['], ['] ]; 2.定义combo控件 { lay ...
- EXTJS 4.2 资料 控件之combo 联动
写两个数据源: 1.IM_ST_Module.js { success:true, data:[ { ModuleId: '1', ModuleName: '资讯' } , { ModuleId: ' ...
- EXTJS 4.2 资料 控件textfield中fieldLabel去掉冒号,控件label的长度
代码: labelSeparator: '', // 去掉laebl中的冒号 labelWidth: 10,//控件label的长度
- EXTJS 4.2 资料 控件之Grid 那些事
最近在学习Extjs4.2 ,积累文章,看得不错,再此留年: //表格数据最起码有列.数据.转换原始数据这3项 Ext.onReady(function(){ //定义列 var columns = ...
- EXTJS 4.2 资料 控件之Window窗体自动填充页面
1.html页面代码: <div id="component" style="width:100%;height:100%"> <body&g ...
- EXTJS 4.2 资料 控件之Grid Columns 列renderer 绑定事件
columns: [ { header: '序号', xtype: 'rownumberer', align: 'center', width: 100 }, { header: 'CompanyId ...
随机推荐
- maya 2015配置openCollada插件
1.下载对应的openCollada插件内容 https://github.com/KhronosGroup/OpenCOLLADA/wiki/OpenCOLLADA-Tools 该页面目前提供Mac ...
- Jersey(1.19.1) - Hello World, Get started with a Web application
1. Maven Dependency <properties> <jersey.version>1.19.1</jersey.version> </prop ...
- Jersey(1.19.1) - Conditional GETs and Returning 304 (Not Modified) Responses
Conditional GETs are a great way to reduce bandwidth, and potentially server-side performance, depen ...
- 面试之SQL(2)--left join, inner join 和 right join的区别
表A记录如下: aID aName 1 a1 2 a2 3 a3 4 a4 5 a5 ...
- Unity3d,OnMouseDown()不执行的原因总结
1.代码:看代码有没有附加上要点击的物体上: 2.碰撞:要点击的物体加了碰撞,位置大小都对:而且鼠标屏幕点击的点和它之间没有其他的碰撞遮挡(OnMouseDown()原理利用了射线): 3.相关的摄像 ...
- iBeacon
iBeacon[1] 是苹果公司2013年9月发布的移动设备用OS(iOS7)上配备的新功能.其工作方式是,配备有 低功耗蓝牙(BLE)通信功能的设备使用BLE技术向周围发送自己特有的ID,接收到该I ...
- C盘空间不足,释放C盘空间
最近电脑总是特别卡,后来发现C盘空间严重不足,只剩下几十兆,以前最严重的时候是剩下0kb可以,怎一个惨字了得... 我所知道的C盘空间不足会导致的几个主要问题有: 1)拷贝大文件会失败.因为拷贝和剪切 ...
- c++ 11 国标标准方面的异常处理与微软在Visual Studio 2012的异常处理的区别
这段代码: __try { } __except(GetErrorCode()) { } 可以捕获空指针,但是包围在其中的代码不能有自带析构函数的对象.c++ 11 标准里面的auto_ptr关键字, ...
- 免费主机kilu使用
我也是看了这篇文章:http://www.cnblogs.com/tenny/archive/2011/03/30/1999957.html 采取申请注册. 主机申请地址:http://www.kil ...
- Oracle表空间操作
-- 查看表空间 SELECT tablespace_name, file_id, file_name, ), )||'M' total_space FROM dba_data_files ORDER ...