1. #1
    Touch Premium Member
    Join Date
    Oct 2011
    Posts
    15
    Vote Rating
    0
    xxz00 is on a distinguished road

      0  

    Default Combox stops working in 4.1 beta

    Combox stops working in 4.1 beta


    Hi,

    Looks like combox stops working on some occasions in 4.1 beta. I am not able to select an item from the combox in one of the popup window. The same code works in 4.0.7.

    The code snippet:

    xtype: 'combo',
    name: 'prMeetingId',
    store: Ext.data.StoreManager.lookup('fivetab-meetingsStore'),
    displayField: 'meetingName',
    valueField: 'id',
    queryMode: 'local',
    emptyText: 'select one meeting',
    fieldLabel: 'meeting',
    allowBlank: false,
    flex: 1,

    Any idea what changes have been made on Combox in 4.1 beta?

    I will also attach the image...
    Attached Images

  2. #2
    Touch Premium Member
    Join Date
    Oct 2011
    Posts
    15
    Vote Rating
    0
    xxz00 is on a distinguished road

      0  

    Default


    Okay. I've found the problem. In my application, the combox is inside a form, and the form is inside a window. The store that combox uses needs to be loaded AFTER the window is created. If the store is loaded before the window is created, the combox cannot be selected. This is NOT the case in 4.0.7. So the behavior has been changed in 4.1. Is this a bug?

  3. #3
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,913
    Vote Rating
    629
    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


    It's hard to say whether this is a bug or not, the description is rather vague. For example if I run this against the 4.1 beta I don't see any issue:

    Code:
    Ext.onReady(function() {
    
        var store = Ext.create('Ext.data.Store', {
            fields: ['a', 'b'],
            data: [{
                a: 1,
                b: 'One'
            }, {
                a: 2,
                b: 'Two'
            }]
        });
        
        Ext.create('Ext.window.Window', {
            autoShow: true,
            title: 'Window',
            layout: 'fit',
            width: 200,
            height: 200,
            items: {
                xtype: 'form',
                items: {
                    xtype: 'combo',
                    store: store,
                    displayField: 'b',
                    valueField: 'a'
                }
            }
        })
    
    });
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  4. #4
    Touch Premium Member
    Join Date
    Oct 2011
    Posts
    15
    Vote Rating
    0
    xxz00 is on a distinguished road

      0  

    Default


    Your store is different than mine. You are using local store, while I was using AJAX proxy to load data from server. I also set autoload to false since I want to load the data on demand.
    In my code, this works:
    var win = Ext.create('...');
    win.show();
    var store = Ext.getStore('storeName');
    store.load();

    If I move the store.load() method ahead of window creation, the combox does not work. This only happens on 4.1 Beta.

Thread Participants: 1