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 ...
随机推荐
- make clean 和make distclean的区别
make clean 和make distclean的区别:make clean仅仅是清除之前编译的可执行文件及配置文件.而make distclean要清除所有生成的文件make distclean ...
- java笔记01-反射
--2013年7月26日17:56:35 写文章之前,参考了这篇:http://www.cnblogs.com/Quincy/archive/2011/06/19/2084557.html 评价:这个 ...
- Simple Arithmetics
def Add(a, b): l = [] alen = len(a) blen = len(b) result = str(int(a) + int(b)) relen = len(result) ...
- 关于TreeSet倒序排列和自定义排列
本文部分转自:http://blog.csdn.net/kaituozhe345/article/details/6842945 1.TreeSet的自然排序. TreeSet存储对象的时候, 可以排 ...
- [改善Java代码] 推荐使用序列化实现对象的拷贝
建议44: 推荐使用序列化实现对象的拷贝 上一个建议说了对象的浅拷贝问题,实现Cloneable接口就具备了拷贝能力,那我们来思考这样一个问题:如果一个项目中有大量的对象是通过拷贝生成的,那我们该如何 ...
- Scala中的偏函数与部分应用函数
Scala中有PartialFunction的概念, 同时还要一个概念叫Partial Applied Function. 前者译作偏函数, 后者译作"偏应用函数"或"部 ...
- ActiveMQ 的安装
1. 在 http://activemq.apache.org/ 下载 ActiveMQ.Windows 系统选择下载 apache-activemq-x.x.x-bin.zip,Unix/Linux ...
- Nginx - Rewrite Module
Initially, the purpose of this module (as the name suggests) is to perform URL rewriting. This mecha ...
- C# 4 dynamic 动态对象 动态类型转换
public class User { //使用省缺参数,一般不需要再为多态做各种静态重载了 public User( string name = "anonym", string ...
- Ubuntu系统中Sogou输入法面板问题解决方案
好消息- Ubuntu Kylin团队与搜狗公司合作开发了“搜狗输入法 for Linux”版本,支持Ubuntu 12.04 和 Ubuntu 14.04操作系统,在Sougou官网就可以下载到,附 ...