PDA

View Full Version : [CLOSED][3.1] checkboxgroup in tabpanel



astagl
1 Feb 2010, 4:03 PM
Ext version tested:


Ext 3.1.0



Adapter used:


ext


css used:


only default ext-all.css


Browser versions tested against:


____
IE8
FF3 (firebug 1.3.0.10 installed)


Operating System:


________
WinXP Pro



Description:


Clicking radio button throws error (see below)



Test Case:



Ext.onReady(function()
{
var form_panel = new Ext.FormPanel({
title: 'test',
items :[{
xtype: 'checkboxgroup',
columns: 1,
defaultType:'radio',
fieldLabel: 'Do you like cheese?',
items: [{
name: 'cheese',
boxLabel: 'Yes'
}, {
name: 'cheese',
boxLabel: 'No'
}]
}]
})

var tab_panel = new Ext.TabPanel({
height:500,
activeTab:0,
autoWidth:true,
items:[form_panel]
})

tab_panel.render('test');
});
this.getCheckEl() is null


38039 onClick : function(){
38040 if(this.el.dom.checked != this.checked){
38041 var els = this.getCheckEl().select('input[name=' + this.el.dom.name + ']');
38042 els.each(function(el){
38043 if(el.dom.id == this.id){
38044 this.setValue(true);
38045 }else{
38046 Ext.getCmp(el.dom.id).setValue(false);
38047 }
38048 }, this);
38049 }
38050 },

evant
1 Feb 2010, 4:07 PM
There's a class called RadioGroup, you should be using this.

Marking as closed.

astagl
1 Feb 2010, 4:10 PM
Doh! Thanks for the quick reply!