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 - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,326
    Answers
    3884
    Vote Rating
    1297
      0  

    Default

    This bug has been fixed in the next release (4.1.0 beta)
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it!

    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 in print!

    When posting code, please use BBCode's CODE tags.

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
  •