Results 1 to 2 of 2

Thread: ajax combobox

  1. #1
    Sencha User
    Join Date
    May 2008
    Posts
    4
    Vote Rating
    0
      0  

    Default Answered: ajax combobox

    Hello!I'm use two comboboxes, select value in first fire ajax store update in second. Update works good, but on second and more updates in second combobox appear loading panel, which not closed, like this:Screen Shot 2011-11-30 at 19.38.28.png

    extjs 4.0.7, code:
    Code:
    var languageStore = new Ext.data.Store({
        autoLoad: true,
        storeId: 'languagesStore',
        proxy: {
            type: 'ajax',
            url: 'languages.json.php',
            reader: {
                type: 'json',
                root: 'languages'
            }
        },
        fields: [{name: 'id', type: 'int'}, {name: 'name', type: 'string'}]
    });
    
    
    var languageCombobox = new Ext.form.ComboBox({
    	fieldLabel: '????',
        id: 'language-combo',
      	store: languageStore,
        disabled: false,
        valueField: 'id',
        displayField: 'name',
        emptyText: '???????? ??????',
        editable: false,
        listeners:
        {
        	select:
        	{
        		fn: function(combo, value)
        		{
        			var cc = Ext.getCmp('country-combo');
        			cc.clearValue();
        			if (cc.isDisabled())
        				cc.setDisabled(false);
        			cc.getStore().load({params: {languageId: combo.getValue()}});
        		}
        	}
        }
    });
    
    
    var countryStore = new Ext.data.Store({
        storeId: 'countriesStore',
        proxy: {
            type: 'ajax',
            url: 'countries.json.php',
            reader: {
                type: 'json',
                root: 'countries'
            }
        },
        fields: [{name: 'id', type: 'int'}, {name: 'name', type: 'string'}]
    });
    
    
    var countryCombobox = new Ext.form.ComboBox({
    	fieldLabel: '??????',
       	id: 'country-combo',
       	store: countryStore,
        disabled: true,
        valueField: 'id',
        displayField: 'name',
        emptyText: '???????? ??????',
        queryMode: 'local',
        editable: false
    });
    Json answer look like this:
    Code:
    {"countries":[{"id":"1","name":"Great Britain"},{"id":"2","name":"USA"}],"total":2}
    Can I hide this loading panel?
    Last edited by mntek; 30 Nov 2011 at 7:58 AM. Reason: code format

  2. This bug has been fixed in the next release (4.1.0 beta)

  3. #2
    Sencha User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,029
    Answers
    3976
    Vote Rating
    1368
      0  

    Default

    This bug has been fixed in the next release (4.1.0 beta)
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Frontend Engineer
    ________________
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:
    https://github.com/mitchellsimoens

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •