我现在定义了一个form然后在 form里面有定义了一些其他的东东包括一些textfield ,combobox等现在我定义了一组radio这样定义的
this.hello= new Ext.form.FieldSet({
title : 'hah1',
id :'hah1'
});this.timeType= {
xtype : 'radiogroup',
// fieldLabel : '时间类型',
itemCls : 'x-check-group-alt',
width : 50,
columns : 1,
items : [ {
boxLabel : '按天',
label:'按天',
name : 'ssTimeType',
inputValue : 0,
checked : true,
listeners : checkTimeType
}, {
boxLabel : '按周',
name : 'ssTimeType',
inputValue : 1,
listeners : checkTimeType
}, {
boxLabel : '按月',
name : 'ssTimeType',
inputValue : 2,
listeners : checkTimeType
} ]
};
然后定义了监听方法
var checkTimeType = {
"check" : function(radioGroup, checked ) {
if (checked)
if(radioGroup.inputValue == '2'){
alert(Ext.getCmp("hello").getId());
}
}
};
这个时候没办法通过Ext.getCmp("hello")来获取hello对象我想问一下怎么修改一下能把我的form当成参数可以在checkTimeType 里面调用,
比如通过 form.hello就能得到hello组件对象
急 我是刚开始接触ext,现在项目太紧了没时间去一个挨着一个研究 希望大家帮帮忙
this.hello= new Ext.form.FieldSet({
title : 'hah1',
id :'hah1'
});this.timeType= {
xtype : 'radiogroup',
// fieldLabel : '时间类型',
itemCls : 'x-check-group-alt',
width : 50,
columns : 1,
items : [ {
boxLabel : '按天',
label:'按天',
name : 'ssTimeType',
inputValue : 0,
checked : true,
listeners : checkTimeType
}, {
boxLabel : '按周',
name : 'ssTimeType',
inputValue : 1,
listeners : checkTimeType
}, {
boxLabel : '按月',
name : 'ssTimeType',
inputValue : 2,
listeners : checkTimeType
} ]
};
然后定义了监听方法
var checkTimeType = {
"check" : function(radioGroup, checked ) {
if (checked)
if(radioGroup.inputValue == '2'){
alert(Ext.getCmp("hello").getId());
}
}
};
这个时候没办法通过Ext.getCmp("hello")来获取hello对象我想问一下怎么修改一下能把我的form当成参数可以在checkTimeType 里面调用,
比如通过 form.hello就能得到hello组件对象
急 我是刚开始接触ext,现在项目太紧了没时间去一个挨着一个研究 希望大家帮帮忙
解决方案 »
- 分享一个准产品级别实现的会议室预定系统前台,大家可以直接应用到自己项目- Fullcalendar实现
- 这个该怎么改才好呢
- 问个关于显示表格的问题
- js parentNode FF IE 兼容问题0
- Javascript可以这样吗?
- 如何取得屏幕坐标?
- 紧急求助,关于层控制问题。
- js中使用iframe跨域访问资源
- 这个者么写,有两个按钮A和B,当鼠标经过A的时候,<Div id="aa">a</div>,当鼠标经过B的时候,<Div id="aa">b</div>,也就是把div里的文字
- 请问如何用JavaScript在网页中“一回车”就寻找“确定”按钮
- ext.window和iframe传值的问题?
- 谁来帮忙注释下每句Javascript代码的意思。
……,
items:[
xtype:'textfield',
ref:'text',
……
]
});这样就可以通过form.text获取到那个textfield