1. #1
    Sencha User
    Join Date
    Oct 2011
    Posts
    14
    Vote Rating
    1
    javaBear is on a distinguished road

      0  

    Default Adding 'Array Store' creates 'Ajax proxy' and 'Array Reader'

    Adding 'Array Store' creates 'Ajax proxy' and 'Array Reader'


    Windows Vista
    EXT-JS 4
    Ext Designer 1.2.0

    I am trying to populate a combo with static values defined in an Array Store and have been following the 'Populating a ComboBox' example in http://www.sencha.com/learn/working-...-ext-designer/.
    When I add the Array Store, an Ajax Proxy and an Array Reader is created.
    In the data property of the Array Store I put in some data: [{Year:'2011'},{Year:'2010'}]
    When I run the application, the values are there, but so is the "Loading"-hourglass-thing and I am unable to select any value.

    Question:
    Should the Ajax Proxy and Array Reader be there when I use the data property of the store for specifying the static data? I am unable to delete them i Designer...

  2. #2
    Sencha User
    Join Date
    Oct 2011
    Posts
    6
    Vote Rating
    0
    mitchind is on a distinguished road

      0  

    Default


    Not sure what they're used for but it works fine for me - once you put your data in the format you're using and not the Array format in the example.

    Did you define your Field "Year"?

    Also - remember to set your combobox fields 'query' to local and the displayField to Year.

    Finally can you post your code - I had problems with mine when the fields weren't defined before the data was assigned. Manually changing the code to define the fieldname beforehand worked for me.

  3. #3
    Sencha User
    Join Date
    Oct 2011
    Posts
    14
    Vote Rating
    1
    javaBear is on a distinguished road

      0  

    Default


    Thanks mitchind!
    Setting queryMode to 'local' did the trick... I thought I had tried everything, but apparently not this...

    By the way: You say "manually changing the code" - do you mean that you change the code in an editor and reload the file (project) again in Designer?

  4. #4
    Touch Premium Member
    Join Date
    Nov 2011
    Location
    Bay Area
    Posts
    68
    Vote Rating
    0
    allan.ditzel is on a distinguished road

      0  

    Default


    I'm running Windows 7 64-bit with Ext Designer 1.2.2-48 and I also see this behavior. When I select "Add Array Store" from the drop down in the Data Stores tab, it always adds a Store with an Ajax Proxy. If I try to delete with ajax proxy by right-clicking and selecting delete, it is not deleted.

    The only way I've found around this is to export the project and in the generated store JS file change the proxy type from 'ajax' to 'memory'.