1. #1
    Sencha User
    Join Date
    Mar 2007
    Location
    Florida
    Posts
    16
    Vote Rating
    0
    slacker775 is on a distinguished road

      0  

    Default ExtDesigner, ComboBox and JsonStore

    ExtDesigner, ComboBox and JsonStore


    I've created a simple form w/ ED that has two ComboBoxes pulling from a JsonStore (all defined w/ ED). I have it all running via my web server but when I activate the combo to populate, it makes the call to the server, gets the proper JSON response, but nothing winds up in the combo itself. I've tried flipping all kinds of settings around to no avail. I'm pretty certain it's just something stupid that I am overlooking, but I can't find it for the life of me.

    Here's the relevant bits of code:

    JsonStore:
    Code:
    TEX.store.Office = Ext.extend(Ext.data.JsonStore, {
        constructor: function(cfg) {
            cfg = cfg || {};
            TEX.store.Office.superclass.constructor.call(this, Ext.apply({
                storeId: 'locationStore',
                root: 'locations',
                url: '/location/list',
                totalProperty: 'total',
                idProperty: 'locationid'
            }, cfg));
        }
    });
    new TEX.store.Office();
    ComboBox def in the form
    Code:
                {
                    xtype: 'combo',
                    fieldLabel: 'Office',
                    anchor: '100%',
                    name: 'office',
                    store: 'locationStore',
                    triggerAction: 'all',
                    valueField: 'locationid',
                    displayField: 'name',
                    id: 'office'
                }
    Json Response when I activate the combo
    Code:
    {"locations":[{"locationid":6,"name":"Atlanta"},{"locationid":13,"name":"Boston"},{"locationid":3,"name":"Calgary"},{"locationid":11,"name":"Dallas"},{"locationid":5,"name":"London"},{"locationid":14,"name":"Phoenix"},{"locationid":15,"name":"Raleigh"},{"locationid":2,"name":"South Florida"},{"locationid":1,"name":"Tampa"},{"locationid":4,"name":"Toronto"},{"locationid":12,"name":"Vancouver"}],"total":11}

  2. #2
    Sencha User
    Join Date
    Mar 2007
    Location
    Florida
    Posts
    16
    Vote Rating
    0
    slacker775 is on a distinguished road

      0  

    Default


    As a quick follow-up, some debugging has turned up that part of my problem is in the readRecords() method in the JsonReader. Some extra, unused variables were tossing an exception. That bug is apparently fixed in svn but now I might be dying further down in the call to extractData().

  3. #3
    Sencha - Desktop Packager Dev Team jarrednicholls's Avatar
    Join Date
    Mar 2007
    Location
    Frederick, MD
    Posts
    1,747
    Vote Rating
    7
    jarrednicholls will become famous soon enough jarrednicholls will become famous soon enough

      0  

    Default


    I don't see any fields defined in your JsonStore. I'd expect to see this:

    Code:
    TEX.store.Office = Ext.extend(Ext.data.JsonStore, {
        constructor: function(cfg) {
            cfg = cfg || {};
            TEX.store.Office.superclass.constructor.call(this, Ext.apply({
                storeId: 'locationStore',
                root: 'locations',
                url: '/location/list',
                totalProperty: 'total',
                idProperty: 'locationid',
                fields: [
                    {
                        name: 'locationid'
                    },
                    {
                        name: 'name'
                    }
                ]
            }, cfg));
        }
    });
    new TEX.store.Office();

  4. #4
    Sencha User
    Join Date
    Mar 2007
    Location
    Florida
    Posts
    16
    Vote Rating
    0
    slacker775 is on a distinguished road

      0  

    Default


    Argh... Adding the fields config took care of it. Are there plans to add the ability to configure the fields for the store in the Designer? Maybe an auto-populate capability based on the fields returned?

  5. #5
    Sencha - Desktop Packager Dev Team jarrednicholls's Avatar
    Join Date
    Mar 2007
    Location
    Frederick, MD
    Posts
    1,747
    Vote Rating
    7
    jarrednicholls will become famous soon enough jarrednicholls will become famous soon enough

      0  

    Default


    Actually yes, you'll be happy to hear that there is :-)

Similar Threads

  1. How was ExtDesigner developed?
    By jarryh in forum Ext Designer: Help & Discussion
    Replies: 2
    Last Post: 22 Apr 2010, 11:20 PM
  2. ComboBox missing attributes in ExtDesigner
    By treadmill in forum Ext Designer: Help & Discussion
    Replies: 1
    Last Post: 21 Apr 2010, 9:03 AM
  3. ExtDesigner bombs on my XP machine.
    By BuckBazooka in forum Ext Designer: Help & Discussion
    Replies: 4
    Last Post: 14 Apr 2010, 1:08 AM
  4. ExtDesigner via proxy, linux64
    By BFT in forum Ext Designer: Help & Discussion
    Replies: 2
    Last Post: 1 Apr 2010, 10:58 PM

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi