1. #1
    Sencha User ytppa's Avatar
    Join Date
    Dec 2011
    Location
    Kemerovo, Russia
    Posts
    7
    Vote Rating
    0
    ytppa is on a distinguished road

      0  

    Question Answered: Combobox.load() - shows that still loading data

    Answered: Combobox.load() - shows that still loading data


    Trying to make a dynamic update of combobox store, here is a part of my code:
    Code:
    Ext.define('MyComboModel', {
        extend: 'Ext.data.Model',
        fields: [
            {name: 'id', type: 'string'},
            {name: 'name',  type: 'string'}
        ]
    });
    
    var myStore2 = Ext.create('Ext.data.Store', {
        model: 'MyComboModel',
        proxy: {
            type: 'ajax',
            url : '/ajax/internat_get_list.php',
            reader: {
                type: 'json',
                root: 'users'
            }
        },
        autoLoad: true
    });   
    
    var myCombo = new Ext.form.ComboBox({
                xtype: 'combo',
                allowBlank: false,
                editable: false,
                triggerAction: 'all',
                typeAhead: false,
                width:180,
                store: myStore2, 
                displayField: 'name',
                valueField: 'id',
                fieldLabel: 'тестовый',
                queryMode: 'local',
                name: 'st'
    });
    
    myupdate = function(id, value) {
      myStore2.load();
      //myCombo.store = myStore2;
      //myCombo.bindStore(myStore2);
      //myCombo.clearValue();
      //myCombo.doLayout();
    }
    ombobox.gif
    on page startup - combobox works correct (look at frame #1, frame #2 on uploaded image).
    As you can see, for the testing, my php script returns a list with timestamp in one of values in array. here is /ajax/internat_get_list.php:
    PHP Code:
     echo '[
          { "id": 1, "name": "Ed Spencer5"},
          { "id": 2, "name": "Abe Elias5"},
          { "id": 3, "name": "' 
    time() . '"},
         { "id": 4, "name": "Abe Elias7"}
     ]'

    but when i call "myUpdate" function - some data in my combobox changes, we can see it on frame #3 (timestamp changed), but when i opens a list of items of combobox (frame #4) - it tells me that combobox data is loading.. =(
    Whats wrong?
    web, flash, games - are the tags of my life.

  2. I suspect you may be running into a known bug in 4.0.7. There are a couple of fixes discussed here:

    http://www.sencha.com/forum/showthread.php?156908

  3. #2
    Sencha User skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,338
    Answers
    498
    Vote Rating
    248
    skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of

      0  

    Default


    I suspect you may be running into a known bug in 4.0.7. There are a couple of fixes discussed here:

    http://www.sencha.com/forum/showthread.php?156908

Thread Participants: 1

Tags for this Thread

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar