-
19 Feb 2010 5:17 AM #1
[FIXED-609] RadioGroup Readonly
[FIXED-609] RadioGroup Readonly
Hi,
I am trying to use the setReadOnyl(true) public method of the Class Ext.form.RadioGroup.
But I am still able to click and change the values (I can select one of the other option)
Within a formpanel
in the .getForm().load({...success...Code:new Ext.form.RadioGroup({id:'TENPERBUDGNOTRECEI',name:'TENPERBUDGNOTRECEI',allowBlank: false,columns: 3,columns: [100, 100, 100], fieldLabel:'At least 10% of the budget must be allocated to organisations that have not received any funding under the HP of the EC in the past 5 years', items:[ {boxLabel: 'YES',name:'TENPERBUDGNOTRECEI',inputValue: '1'}, {boxLabel: 'NO',name:'TENPERBUDGNOTRECEI',inputValue: '0'}, {boxLabel: 'N/A',name:'TENPERBUDGNOTRECEI',inputValue: '9'}]})
The .setDisabled(true) works but the forced value is not sent as the input is disabled...Code:if (Ext.getCmp('PERCENTTOTBUDGREQUESTFLAG').getValue() == 'NO') { Ext.getCmp('TENPERBUDGNOTRECEI').setValue(9); Ext.getCmp('TENPERBUDGNOTRECEI').setReadOnly(true); }
In advance, thank you
-
19 Feb 2010 1:23 PM #2
Yes, it seems that readOnly option of RadioGroup is ignored (disabled option works). Now, I don't know if readOnly should be supported and is not - that would be Ext bug or if it shouldn't be supported but is documented - that would be documentation bug.
Nevertheless, moving the thread to Bugs forum.Jozef Sakalos, aka Saki
A lot of valuable info at:
Saki's Extensions and Plugins
Saki's Extensions and Plugins Docs
Saki's Examples, Latest: Grid in Card Layout
Saki's Blog, Featured: Writing a Big Application in Ext, Latest: Grid MultiSearch Plugin Video
-
21 Feb 2010 11:16 PM #3
OK, I will wait for an answer and write at the server side the specific condition (if not passed, force database value)...
Thanks
-
9 Mar 2010 2:50 PM #4Sencha - Sencha Touch Dev Team
- Join Date
- Mar 2007
- Location
- Redwood City, California
- Posts
- 3,659
- Vote Rating
- 14
[type]: fix
[module]: CheckboxGroup
[id]: #609
[desc]: Fixes #609. CheckboxGroup/RadioGroup will now apply setReadOnly to their child items.
-
11 Mar 2010 2:31 AM #5
Is it part of 3.1.2?
-
11 Mar 2010 10:54 AM #6Sencha - Sencha Touch Dev Team
- Join Date
- Mar 2007
- Location
- Redwood City, California
- Posts
- 3,659
- Vote Rating
- 14
No, this will be in 3.2
-
12 Mar 2010 12:17 AM #7
-
15 Jun 2010 5:23 AM #8
Has this definitely been fixed for 3.2.1? I still have the same issue. After I use setReadOnly(true), I can still change the selected radio button:
Ext.getCmp("radiogroup-sexo").setReadOnly(true);
Code:{ xtype: 'radiogroup', columns: 2, name:'sexo', id:'radiogroup-sexo', items: [ {boxLabel: 'V', name: 'sexo', inputValue:'V'}, {boxLabel: 'H', name: 'sexo', inputValue:'H'} ] },
-
15 Jun 2010 5:51 AM #9
Browsers don't recognize readOnly on checkboxes/radios. The best you can do is disable them.
Evan Trimboli
Sencha Developer
Twitter - @evantrimboli
Don't be afraid of the source code!
-
30 Jun 2010 6:55 AM #10
A solution can be into Ext.form.RadioGroup:
Evant (ExtJS Team), can you check if it is a valid solution also for you and implements it in a next ExtJS Release?Code:bufferChecked : function(){ if(this.readOnly) { this.reset(); return false; } var out = null; this.eachItem(function(item){ if(item.checked){ out = item; return false; } }); this.fireEvent('change', this, out); },
It is working for me.
TyLast edited by dtex-lab; 30 Jun 2010 at 6:58 AM. Reason: Reopen issue
we make IT work for you
Thank you for reporting this bug. We will make it our priority to review this report.



Reply With Quote
