PDA

View Full Version : [DEFER-614] RadioGroup.ownerCt is not set correctly



Ozone
8 Dec 2009, 4:43 AM
Hi there.

When I try to set a ref for a RadioButton inside a RadioGroup, it never gets set.

It appears that RadioGroup has no ownerCt and this broken tree structure might be the culprit. A quite similar problem is described in tread 71261 (http://www.extjs.com/forum/showthread.php?t=71261), but that tread is stated as fixed, hence this new tread.

The bug appears using:
Ext.3.X trunk (and revision 5000)

OP System:
MS WinXP Pro SP3

Browsers:
Firefox 3.5.5
Chrome 3.0.195.33
IE 8.0.6001.18702
Opera 10.10
Safari 4.528.17

Testcase:


<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title id='title'>RadioGroup Lacking OwnerCt Bug</title>

<link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
<script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="../../ext-all-debug.js"></script>

<script type="text/javascript">
Ext.BLANK_IMAGE_URL = '../../resources/images/default/s.gif';

Ext.onReady(function(){

var myPanel = new Ext.Panel({
renderTo: Ext.getBody(),
items: [
{
xtype: 'panel',
items: [
{
xtype: 'radio',
boxLabel: 'this ref works',
ref: '../../abc1'
}
]
},
{
xtype: 'radiogroup',
items: [
{
xtype: 'radio',
boxLabel: 'this ref does not',
ref: '../../abc2'
}
]
}
]
});

alert("myPanel.abc1: "+myPanel.abc1+"\nmyPanel.abc2: "+myPanel.abc2);
});

}); //end onReady
</script>

</head>
<body>
</body>
</html>Steps to reproduce:
At the alertbox, there is a functional ref for the Radio on the Panel, while the Radio in the RadioGroup has no ref.

/Ozone

evant
8 Dec 2009, 5:09 AM
Correct, because the RadioGroup isn't a container, so technically the panel isn't "owned" by the radio group.

Ozone
27 Jan 2010, 8:05 AM
Correct, because the RadioGroup isn't a container, so technically the panel isn't "owned" by the radio group.

Then how do I get ref's to my radiobuttons? :s

stephen.friedrich
22 Feb 2010, 3:36 AM
Then how do I get ref's to my radiobuttons? :s
Indeed, how do I?

Also please fix the documentation and add a big note to the "ref" property of Ext.form.Radio saying that it won''t work if the radio is in a radio group.

Jamie Avins
22 Feb 2010, 9:10 AM
They should be containers (or at least give you this functionality). I'll assign this a ticket, but you are looking at a 3.2 or 3.3 minor release timeframe for this type of change.

Ozone
22 Feb 2010, 11:31 PM
They should be containers (or at least give you this functionality). I'll assign this a ticket, but you are looking at a 3.2 or 3.3 minor release timeframe for this type of change.

Sounds great - if it's worth having, it's worth waiting for! =P~