-
24 May 2012 5:44 AM #11
Well no, within the test case and 4.0.7 it works fine..
So the bug is back in 4.1.0
-
29 May 2012 9:46 AM #12
Hmmm, it was not working for me under 4.0.7 (this case was never closed either).
Anyways, you are right, this is still a problem in 4.1.0
Here is the updated test case
Code:<html> <head> <title>ExtJs 4.1 - combobox setValue bug</title> <!-- Ext includes --> <link rel="stylesheet" type="text/css" href="http://dev.sencha.com/deploy/ext-4.1.0-gpl/resources/css/ext-all.css" /> <script type="text/javascript" src="http://dev.sencha.com/deploy/ext-4.1.0-gpl/ext-all.js"></script> <script type="text/javascript"> Ext.Loader.setConfig({ enabled: true }); Ext.require([ 'Ext.form.field.ComboBox', 'Ext.form.FieldSet', 'Ext.tip.QuickTipManager', 'Ext.data.*' ]); Ext.onReady(function() { Ext.tip.QuickTipManager.init(); // Define the model for a State Ext.define('State', { extend: 'Ext.data.Model', fields: [ {type: 'string', name: 'abbr'}, {type: 'string', name: 'name'}, {type: 'int', name: 'id'} ], idProperty: 'id' }); // The data for all states var states = [ {"abbr":"AL","name":"Alabama","id":1}, {"abbr":"AK","name":"Alaska","id":2}, {"abbr":"AZ","name":"Arizona","id":3}, {"abbr":"AR","name":"Arkansas","id":4}, {"abbr":"CA","name":"California","id":5} ]; // The data store holding the states; shared by each of the ComboBox examples below var store = Ext.create('Ext.data.Store', { model: 'State', data: states }); // Simple ComboBox using the data store var simpleCombo = Ext.create('Ext.form.field.ComboBox', { fieldLabel: 'Select a single state', renderTo: Ext.getBody(), displayField: 'name', width: 320, labelWidth: 130, store: store, queryMode: 'local', typeAhead: true, valueField: 'id', displayField: 'abbr' }); Ext.create('Ext.Button', { text: 'Set Value with quote', renderTo: Ext.getBody(), handler: function() { simpleCombo.setValue('2'); alert("simpleCombo.setValue('2');"); } }); Ext.create('Ext.Button', { text: 'Set Value without quote', renderTo: Ext.getBody(), handler: function() { simpleCombo.setValue(4); alert("simpleCombo.setValue(4);"); } }); }); </script> </head> <body> <form id="history-form" class="x-hide-display"> <input type="hidden" id="x-history-field" /> <iframe id="x-history-frame"></iframe> </form> </body> </html>
-
30 Nov 2012 11:55 AM #13
Will this be fixed ever? I just spent about 5 hours debugging an upgrade issue because of this.
-
17 Apr 2013 7:50 AM #14
You found a bug! We've classified it as
a bug in our system.
We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.


Reply With Quote