1. #1
    Sencha User
    Join Date
    Jan 2009
    Location
    Ottawa, ON, Canada
    Posts
    81
    Answers
    6
    Vote Rating
    0
    myExtJsUname is on a distinguished road

      0  

    Default Answered: ComboBox "Loading..." mask won't go away when drop-down list visible

    Answered: ComboBox "Loading..." mask won't go away when drop-down list visible


    I've tried the suggestions I've found in this forum but haven't had any success yet. I'm hoping someone can take a quick look and see if they can identify what I am missing or incorrectly defining. I started out with a web service JSON store that was exhibiting this behaviour and have been making the example simpler and simpler trying to find where I am going wrong. Now, it's as simple as I can make it and I still can't see the problem.

    The scenario:
    Based on previous selections, I am dynamically creating a ComboBox and adding it to an empty Ext.panel.Panel with the code below. After rendering, and when I click on the ComboBox's down arrow, the selection possibilities remain greyed out and there is a "Loading..." mask that never goes away. I'm assuming I've missed something along the way in defining these items but can't find what is missing.

    Any help would be appreciated.

    Cheers,
    jtm

    Code:
                Ext.define(
                    "classificationMethod"
                    ,{
                        extend: "Ext.data.Model"
                        ,fields: ["key", "text"]
                    }
                );
    
                var store = Ext.create(
                    'Ext.data.Store'
                    ,{
                        model: 'classificationMethod'
                        ,data: [
                            {
                                key: "equal-interval"
                                ,text: "Equal Interval"
                            }
                            ,{
                                key: "natural-breaks"
                                ,text: "Natural Breaks"
                            }
                            ,{
                                key: "quantile"
                                ,text: "Quantile"
                            }
                        ]
                    }
                );
    
                this.cmbClassMethod = Ext.create(
                    'Ext.form.field.ComboBox'
                    ,{
                        emptyText: "Select classification method to use..."
                        ,anchor: "100%"
                        ,store: store
                        ,displayField: "text"
                        ,valueField: "key"
                        ,forceSelection: true
                    }
                );

  2. See if this works:

    Code:
    Ext.define("classificationMethod", {
        extend: "Ext.data.Model",
        fields: ["key", "name"]
    });
    
    var store = Ext.create('Ext.data.Store', {
        model: 'classificationMethod',
        data: [
        {"key": "equal-interval", "name": "Equal Interval"},
        {"key": "natural-breaks", "name": "Natural Breaks"},
        {"key": "quantile",       "name": "Quantile"}
        ]
    });
    
    Ext.create('Ext.form.field.ComboBox', {
        emptyText: "Select classification ... ",
        store: store,
        displayField: "name",
        valueField: "key",
        queryMode: 'local',
        forceSelection: true,
        renderTo: Ext.getBody()
    });
    Scott.

  3. #2
    Touch Premium Member
    Join Date
    Jul 2011
    Location
    Cuernavaca, Mexico
    Posts
    51
    Answers
    2
    Vote Rating
    1
    ErnestoR is on a distinguished road

      0  

    Default


    If your using ExtJs 4.0.7 has a known bug regarding the LoadMask class.

    Try this override and see if it helps:

    Code:
    
    
    Code:
    Ext.override(Ext.LoadMask, {
    onHide: function() { 
    this.callParent();
    }
    });
    


  4. #3
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    8,630
    Answers
    613
    Vote Rating
    400
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    Or upgrade to 4.1.1

    Scott.

  5. #4
    Sencha User
    Join Date
    Jan 2009
    Location
    Ottawa, ON, Canada
    Posts
    81
    Answers
    6
    Vote Rating
    0
    myExtJsUname is on a distinguished road

      0  

    Default


    Sorry, I should have said that I am using ExtJs 4.1.1; but thanks for taking the time to respond anyway.

  6. #5
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    8,630
    Answers
    613
    Vote Rating
    400
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    See if this works:

    Code:
    Ext.define("classificationMethod", {
        extend: "Ext.data.Model",
        fields: ["key", "name"]
    });
    
    var store = Ext.create('Ext.data.Store', {
        model: 'classificationMethod',
        data: [
        {"key": "equal-interval", "name": "Equal Interval"},
        {"key": "natural-breaks", "name": "Natural Breaks"},
        {"key": "quantile",       "name": "Quantile"}
        ]
    });
    
    Ext.create('Ext.form.field.ComboBox', {
        emptyText: "Select classification ... ",
        store: store,
        displayField: "name",
        valueField: "key",
        queryMode: 'local',
        forceSelection: true,
        renderTo: Ext.getBody()
    });
    Scott.

  7. #6
    Sencha User
    Join Date
    Jan 2009
    Location
    Ottawa, ON, Canada
    Posts
    81
    Answers
    6
    Vote Rating
    0
    myExtJsUname is on a distinguished road

      0  

    Default


    Thank you, Scott. Setting the queryMode to "local" did the trick.

    I'm guessing, then, that setting it to "remote" for the web service JSON store definition I was orginally trying to do will take care of the problem that was appearing in my app. At this point, I've changed the code so much just trying to get something (anything) in this regard to work, that I'm effectively starting over again.

    I'll indicate if that takes care of my real problem later, but certainly setting queryMode to "local" takes care of this thread's question. I'll mark it answered based on that and if I find I still can't get the remote one working I'll try to come up with a better example of that specifically and start a new thread.

    Cheers,
    jtm

Thread Participants: 2

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