-
13 Sep 2012 4:12 AM #1
Unanswered: Combobox always get value of displayField in IE
Unanswered: Combobox always get value of displayField in IE
Dear All:
I has a problem here, i think taht maybe is a bug. I write a combobox function like Ex1.
The function is work current in FireFox and Chroom, but in IE8 the value of this combobox
will always get displayField value ( "Read Only" or "Read/Write" ).
Please some body help me. thanks
.
Code:Ex1: ... { header: "Policy", dataIndex:'policy', flex: 1, sortable: true, align:'center', renderer:function(value){ return (value.indexOf('ro') > -1 )? 'Read Only':'Read/Write'; }, editor:{ xtype:'combobox', mode: 'local', triggerAction: 'all', forceSelection:true, displayField:'label', valueField:'policy', store:{ xtype: 'jsonstore', fields:[ 'label', 'policy' ], data:[ {label: 'Read Only', policy: 'ro'}, {label: 'Read/Write', policy: 'rw'} ] } }//eo editor }
thanks
-
17 Sep 2012 9:08 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 34,107
- Vote Rating
- 453
- Answers
- 3157
What Ext JS 4 version? Using a combobox as an editor works no issues for me.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
19 Sep 2012 2:46 AM #3
Dear mitchellsimoens:
Ext version tested:
Ext 4.1.1
Browser versions tested against:
IE 8 (Windows)
Description:
Ext.form.field.Combobox - method getValue always get displayfield value.
The other, i has use a plug-in tool Ext.i18n.Bundle( https://github.com/elmasse/Ext.i18n.Bundle ) to display label information.
Steps to reproduce the problem:
Create an form contain a Ext.form.field.Combobox.
I use a plug-tool "Ext.i18n.Bundle" to set the value of displayfield.
Select a option of combobox.
The value return by method "getValue" is displayfield value, not valuefield.
Test Case:
Code:... { header: "Policy", dataIndex:'policy', flex: 1, sortable: true, align:'center', renderer:function(value){ return (value.indexOf('ro') > -1 )? Ext.i18n.appBundle.getMsg('Sharev.READY_ONLY'): Ext.i18n.appBundle.getMsg('Sharev.READY_WRITE'); }, editor:{ xtype:'combobox', mode: 'local', triggerAction: 'all', forceSelection:true, displayField:'label', valueField:'policy', store:{ xtype: 'jsonstore', fields:[ 'label', 'policy' ], data:[ {label: Ext.i18n.appBundle.getMsg('Sharev.READY_ONLY'), policy: 'ro'}, {label: Ext.i18n.appBundle.getMsg('Sharev.READY_WRITE'), policy: 'rw'} ] } }//eo editor }
See this URL for live test case:
none
Debugging already done:
none
Additional CSS used:
only default ext-all.css
Operating System:
WindowsXP SP3
-
19 Sep 2012 7:10 AM #4
-
20 Sep 2012 9:48 PM #5
Dear lunti:
Sorry, i was review about your post( Combobox in a form posts description instead of value ), but i am so confused about that. Should i put that code you post insert to model? but the code just filter data, right?
If i want to get the value from 'valuefield' that i need assigent value to 'valuefield' again, or has another why?
thank you
-
23 Sep 2012 9:48 PM #6
Hey volcom721,
I don't understand your problem very well. The code i gave is to prevent getting a wrong formatted value.
You can use it anywhere - if you have problems with validating for example, put it in the model validation.
In my case I had to validate it on the "select" event before I reload my store.
-
25 Sep 2012 12:30 AM #7
Ok, i will try again. However, i am so thanks for your help.


Reply With Quote