Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Ext JS Premium Member
    Join Date
    Jul 2010
    Location
    UK
    Posts
    524
    Vote Rating
    29
    MrSparks has a spectacular aura about MrSparks has a spectacular aura about

      0  

    Default [OPEN-EXTJSIV-1638][4.0.1] ComboBox Initial Value

    [OPEN-EXTJSIV-1638][4.0.1] ComboBox Initial Value


    Setting the "value" is being ignored as the initial item to show in the combo. Instead we just see a blank area or if emptyText is set we get that.

    Typically you can set the value to a store ID or the Text value of one of the store items.

  2. #2
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,795
    Vote Rating
    602
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    Please post a short test case that demonstrates the issue.
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  3. #3
    Touch Premium Member
    Join Date
    Feb 2011
    Posts
    15
    Vote Rating
    1
    hulstein is on a distinguished road

      0  

    Default


    I posted the same issue yesterday:

    I have some dialogs with comboBoxes. These combo boxes are loaded from a datastore (defined as local, butting getting data from an ajax call). In previous releases when I load the dialog, the value of the selected item is set to the combo, and the combo then displays the previous selection. Now it sometimes does this, but sometimes it shows a blank combo, but as soon as I click on it it jumps to the selected item and considers it selected.

    Am I doing something wrong in handling this, or has something changed that affects this?
    So the form I'm using is getting set from another (grid) view:

    Code:
    		this.siteDetails = Ext.create( 'widget.sitedetails' );
    		this.siteDetails.load( {
    			url: 'api/sites/load/',
    			params: { f_site_id: site_id }
    		} );
    This properly fetches all the data and sets it in the following form, however, for some combo's the selected value is selected, for others it is not. So it seems to be a case of 'order in which things are processed', or an event trigger not being handled.

    The combo box is set as follows:

    Code:
    	var siteTypeCombo = new Ext.form.ComboBox({
    		fieldLabel: 'Select a site type',
    		labelStyle: 'font-weight:bold',
    		name: 'f_site_type_id',
    		id: 'sitetypecombo',
    		allowBlank: false,
    		editable: false,
    		queryMode: 'local',
    		displayField: 'f_popup_option_name',
    		valueField: 'f_popup_option_id',
    		store: new Ext.data.Store({
    			model: 'TYPE_PopupOption',
    			autoLoad: true,
    			proxy: {
    				type: 'ajax',
    				url: 'api/popup_options/family/site_type',
    				reader: {
    					type: 'json',
    					root: 'data'
    				}
    			}
    		})
    	});
    where 'f_site_type_id' is the id loaded by the 'api/sites/load/' call.

  4. #4
    Ext JS Premium Member
    Join Date
    Jul 2010
    Location
    UK
    Posts
    524
    Vote Rating
    29
    MrSparks has a spectacular aura about MrSparks has a spectacular aura about

      0  

    Default


    Here's my Config
    Code:
    Ext.onReady(function(){
    
    
    Ext.regModel('CompanyList', {
        fields: [
            {name: 'companyid', type: 'int'},
            {name: 'companyname',  type: 'string'}
        ]
    });
    
    
    var store = new Ext.data.Store({
        model: 'CompanyList',
        proxy: {
            type: 'ajax',
            url : '/pages/company_combo.cfm',
            reader: {
                type: 'json',
                root: 'data'
            }
        }
    });
    store.load();
    
    var combobox = Ext.create('Ext.form.ComboBox', {
    	id: 'companyCombo',
    	store: store,
    	queryMode: 'local',
    	displayField: 'companyname',
    	valueField:'companyid',
    	submitEmptyText: false,
    	hiddenValue: 0,
    	value: 0,
    	hiddenName: 'companyid',
    	editable: false,
        forceSelection: true,
        triggerAction: 'all',
    }); 
    
    
    var accordionPanel = new Ext.Panel({
    	title: 'Panel',
    	id: 'panel001',
    	autoScroll: false,
    	hidden: false,
    	border: 0,
    	layout: 'fit',
    	items:[
    		combobox
    	]
    });
    
    
    var myAccordion = Ext.create('Ext.panel.Panel', {
    	region: 'center',
    	id: 'myPanelId',
    	border: 0,
    	items: [
    		accordionPanel
    	]
    	
    });
    
    Ext.create('Ext.Viewport', {
            id: 'testing',
    		layout: {
                type: 'fit'
            },
            items: [
    			myAccordion
    		]
    	});
    
    });
    json
    Code:
    {
    success:true,
    data:[
    		{
    			"companyid"  : "0",
    			"companyname" : "Default Company"
    		},
    		{
    			"companyid"  : "5",
    	
    			"companyname" : "Test company"
    		}
    		,
    		{
    			"companyid"  : "1",
    			"companyname" : "ACME"
    		}
    		,
    		{
    			"companyid"  : "4",
    			"companyname" : "Another Company XYZ"
    		}
    		,
    		
    		{
    			"companyid"  : "3",
    			"companyname" : "Test company 2"
    		}
    	]
    }

  5. #5
    Ext JS Premium Member
    Join Date
    Apr 2011
    Posts
    53
    Vote Rating
    1
    eja40 is on a distinguished road

      0  

    Default


    could it be a type issue? value: 0 is not the same as value: "0"
    in your data store it would expect "0" not 0

  6. #6
    Ext JS Premium Member
    Join Date
    Jul 2010
    Location
    UK
    Posts
    524
    Vote Rating
    29
    MrSparks has a spectacular aura about MrSparks has a spectacular aura about

      0  

    Default


    Quote Originally Posted by eja40 View Post
    could it be a type issue? value: 0 is not the same as value: "0"
    in your data store it would expect "0" not 0
    It's an INT value, so not quotes needed. In EXT 3.3 you could reference a STRING e.g. value : 'Default Company' but that doesn't work in EXTJS 4 either.

  7. #7
    Ext JS Premium Member
    Join Date
    Jul 2010
    Location
    UK
    Posts
    524
    Vote Rating
    29
    MrSparks has a spectacular aura about MrSparks has a spectacular aura about

      0  

    Default


    Issue is still present in 4.0.0

  8. #8
    Ext JS Premium Member
    Join Date
    Jul 2010
    Location
    UK
    Posts
    524
    Vote Rating
    29
    MrSparks has a spectacular aura about MrSparks has a spectacular aura about

      0  

    Default


    @Devteam

    Issue is still present in 4.0.1

  9. #9
    Sencha User
    Join Date
    May 2011
    Posts
    1
    Vote Rating
    0
    dmitry.uvarov is on a distinguished road

      0  

    Default


    Hi guys,

    I've just found the same issue. Instead of posting sample code I can post code from ExtJS 4.0.1 itself.
    Ext.form.field.ComboBox:

    Code:
            if (me.store.loading) {
                // Called while the Store is loading. Ensure it is processed by the onLoad method.
                me.value = value;
                return me;
            }
    Notice comment: 'Ensure it is processed by the onLoad'

    And onLoad listing:
    Code:
       onLoad: function() {
            var me = this,
                value = me.value;
    
            me.syncSelection();
            if (me.picker && !me.picker.getSelectionModel().hasSelection()) {
                me.doAutoSelect();
            }
        },
    Here's my code from ext-fix.js I have for such stuff:

    Code:
    Ext.override(Ext.form.field.ComboBox, {
    	onLoad: function() {
    		this.callOverridden();
    		this.setValue(this.value);
    	}
    });
    It works perfectly well for me so far, so I guess you just need to implement that processing on your own.

  10. #10
    Ext JS Premium Member
    Join Date
    Jul 2010
    Location
    UK
    Posts
    524
    Vote Rating
    29
    MrSparks has a spectacular aura about MrSparks has a spectacular aura about

      0  

    Default


    Quote Originally Posted by dmitry.uvarov View Post
    Here's my code from ext-fix.js I have for such stuff:

    Code:
    Ext.override(Ext.form.field.ComboBox, {
    	onLoad: function() {
    		this.callOverridden();
    		this.setValue(this.value);
    	}
    });
    It works perfectly well for me so far, so I guess you just need to implement that processing on your own.
    Works great for me also!

Similar Threads

  1. Replies: 2
    Last Post: 28 Mar 2011, 6:26 AM
  2. Replies: 1
    Last Post: 21 Mar 2011, 7:30 AM
  3. Replies: 0
    Last Post: 21 Mar 2011, 5:56 AM
  4. [OPEN-EXTJSIV-203] API Docs: ComboBox
    By PV-Patrick in forum Ext:Bugs
    Replies: 0
    Last Post: 21 Mar 2011, 12:41 AM
  5. [OPEN] [OPEN-EXTJSIV-210] ComboBox Validation
    By PV-Patrick in forum Ext:Bugs
    Replies: 0
    Last Post: 19 Mar 2011, 5:12 PM

Thread Participants: 7

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi