-
5 Feb 2008 12:46 AM #21
-
7 Feb 2008 5:05 AM #22
Here's a fix:
Code:// private onDestroy : function(){ if (this.radios && this.radios instanceof Array) { var cnt = this.radios.length; for(var x=1;x<cnt;x++){ this.els[x].destroy(); } } if(this.wrap){ this.wrap.remove(); } Ext.ux.RadioGroup.superclass.onDestroy.call(this); },
-
7 Feb 2008 8:59 AM #23
Thanks for this fantastic extension, vtswingkid!
-
11 Feb 2008 12:15 PM #24
Release 1.0.2:
mdissel: onDestroy fix added.
-
12 Feb 2008 1:54 PM #25
Firefox error when using radiogroup plugin
Firefox error when using radiogroup plugin
I get the following in Firebug:
[Exception... "'Error parsing selector, parsing failed at "]:checked"' when calling method: [nsIDOMEventListener::handleEvent]" nsresult: "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)" location: "<unknown>" data: no]
this happens when I build a group of radio buttons using the radios parameter, and it happens when I set checked to both true and false.
-
13 Feb 2008 12:53 AM #26
Nice extension. Can I suggest something that I added as an override to the standard Ext Radio control?
You can select the radio control which has the value using a DomQuery selector:
Code:/** * Checks the radio box with the matching value * @param {Mixed} v */ setValue : function(v){ if(!this.rendered) { this.value=v; return; } var p=this.el.up('form');//restrict to the form if it is in a form if(!p)p=Ext.getBody(); var target = p.child('input[name=' + this.el.dom.name + '][value=' + v + ']', true); if (target) target.checked = true; }Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
-
13 Feb 2008 4:32 AM #27
-
13 Feb 2008 8:53 AM #28
thanks, yes, a problem with the field name
thanks, yes, a problem with the field name
Yes, firefox craps out when you do your domquery select and the radio field name includes square brackets [] AND the domquery uses the :checked selector syntax , I created a workaround using the click handler to set a hidden field's value, thanks for the extension...
-
14 Feb 2008 7:01 AM #29
EDIT: I take that back. Your code seems to be triggering the check event also. I just noticed the "true" that was returning the dom element and decided I had better give it a try. Thanks Animal! This has been added to 1.0.3.
Animal: The current setValue function also removes the check from the other radios in the group and fires the check event. Some browsers were not doing this properly if I remember correctly. This is why I do not simply check the single radio box. Am I missing something else?
-
17 Feb 2008 1:40 AM #30
Listener doesn't always fire
Listener doesn't always fire
Hi vtswingkid & all
Thanks for a great extension. It's always nice to see someone already wrote something that I myself wouldn't be capable of.
Small problem though. Not sure if it would be related to your code or the Animal addition.
I used your RadioGroup as follows (stripped down to the essentials for testing):
When the input value (using SetValue) is set to the radio with the listener, the listener doesn't fire when the other radio is being selected (such as the above example), neither in FF nor IE.PHP Code:var fld = new Ext.ux.RadioGroup({
name:'group1',
horizontal:true,
radios:[{
value:'t1',
boxLabel:'Yes',
listeners:{
'check':function(r,c){
alert(c);
}
}
}, {
value:'t0',
boxLabel:'No'
}]
});
fld.render(fldnm);
value = 't1';
fld.setValue(value); // Input value
It does the second time around, so if I'd select No, Yes, No it fires on Yes and the second No.
All's fine if the input value is NOT the one with the listener (and you'd select the radio with the listener first).
Would you (or anyone else) know what the reason is or how I can circumvent this problem?
Thanks in advance!
Patrick




Reply With Quote