Results 1 to 7 of 7

Thread: ComboBox with Json Store

  1. #1
    Ext User
    Join Date
    Mar 2010
    Posts
    15
    Vote Rating
    0
      0  

    Default ComboBox with Json Store

    Hi,

    has anyone got it working?

    Store is properly loading but nothing can be selected in the combobox.

    Here is simple example. What is wrong?

    Json is provided by the following srchas.php

    <?php
    echo '{
    "srchas" : [
    {
    "type" : "Phrase",
    "value" : "1"
    },
    {
    "type" : "Phrase Feldanfang",
    "value" : "2"
    },
    {
    "type" : "Wort AND",
    "value" : "3"
    },
    {
    "type" : "Wort OR",
    "value" : "4"
    }
    ]
    }';
    ?>

    Thanks and Regarda
    Attached Files Attached Files

  2. #2
    Ext User
    Join Date
    Mar 2010
    Posts
    15
    Vote Rating
    0
      0  

    Default

    Sorry,

    the combostore.xds is obsolete.

    This is the current:
    Attached Files Attached Files

  3. #3
    Sencha User jarrednicholls's Avatar
    Join Date
    Mar 2007
    Location
    Frederick, MD
    Posts
    1,747
    Vote Rating
    7
      0  

    Default

    Hi rhenkel,

    I'm assuming you're viewing this in the Preview. The Preview has some issues with Stores at the moment. This is an open issue we are working on. If you export your project and view in your own browser from your local web server...and given your "url" is setup properly...you will see that your configuration is absolutely correct and loads perfectly. The only other option you may want to change (depending on the behavior you want in the end) is to make the mode "local" instead of "remote" (the default).

  4. #4
    Ext User
    Join Date
    Mar 2010
    Posts
    15
    Vote Rating
    0
      0  

    Default

    Hi jarrednicholls,

    Thank you a lot. I should have had a look at this in a browser before complaining. I was actually not aware of these preview issues.

  5. #5
    Sencha User
    Join Date
    Nov 2009
    Posts
    9
    Vote Rating
    0
      0  

    Default

    I am having the same problem and I am using a browser. I can see in firebug that my data store is loading. One thing that confuses me is that in the ui file in the combo definition, the store name has quotes around it. Any suggestions on why the combo is empty?

    {
    xtype: 'combo',
    fieldLabel: 'Label',
    anchor: '100%',
    store: 'DBMethod',
    valueField: 'id',
    displayField: 'method'
    }

  6. #6
    Sencha User aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,487
    Vote Rating
    146
      0  

    Default

    When you specify a storeId in your Store, it will register the Store with the StoreMgr.

    You can then use a string in any store configuration to auto look it up from the StoreMgr.

    Take a look at Ext.StoreMgr.lookup('DBMethod').getRange() in your console.

    Are your records there?
    Aaron Conran
    @aconran

  7. #7
    Sencha User
    Join Date
    Nov 2009
    Posts
    9
    Vote Rating
    0
      0  

    Default

    Thanks for replying to my post! Yes, using the command you suggested I can see that the data appears to exist in the datastore at the point where my app's initComponent function is called.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •