-
2 Nov 2011 12:12 AM #1
[PR1] radiofield getValue
[PR1] radiofield getValue
The getValue-methode from radiofield use the inherited getValue-methode from checkbox, so it returns only true or false and not the config.value.
Tested on Chrome 15.0.874.106 beta
kind regards
Jan
-
2 Nov 2011 7:41 AM #2Sencha - Sencha Touch Dev Team
- Join Date
- Mar 2007
- Location
- Redwood City, California
- Posts
- 3,653
- Vote Rating
- 14
Thank you for the report.
-
18 Jan 2012 1:05 PM #3
I seems suddenly get the bug, after I implement store on controller, is it related?
I seems suddenly get the bug, after I implement store on controller, is it related?
I can see the value using form.getValues() before. However after implement a store, the radiofield value turned to 'true' or 'null'? Example of console debug form.getValues() output:.
- gender: true
- name: "bill"
- null: null
- q1: true
- q2: true
- q3: true
- q4: true
- q5: null
- q6: null
- q7: null
- q8: true
- q9: nul
-
18 Jan 2012 2:19 PM #4
Radiofield not get value, instead of true and null?
Radiofield not get value, instead of true and null?
Further reading into the sencha-touch-all-debug.js,
on line 41118:
getValue: function() {
return this._value;
},
and my debug on gender radio field has the value:
- _name: "gender"
- _required: false
- _requiredCls: "x-field-required"
- _styleHtmlCls: "x-html"
- _tabIndex: -1
- _ui: "radio"
- _value: "m"
On my view realated code:
{ xtype: 'radiofield', name: 'gender', label: 'Male', value: 'm' }, { xtype: 'radiofield', name: 'gender', label: 'Female', value: 'f' }
Many Thanks if anyone could answer this?
-
21 Jan 2012 12:24 PM #5
Figured out a way to get around the problem
Figured out a way to get around the problem
It is pain, however have to get over it, I figured out to add a listener for the check event and set the value for the field using form model, here is the function:
doCheck: function( e){
var aValue=e._value;
var form=e.up();
form.getRecord().set(e.getName(), aValue);
}
Success! Looks like we've fixed this one. According to our records the fix was applied for
TOUCH-958
in
2.0.


Reply With Quote