Results 1 to 5 of 5

Thread: many combobox use one ajax store

  1. #1
    Touch Premium Member
    Join Date
    Nov 2011
    Posts
    5

    Default Answered: many combobox use one ajax store

    I wanna draw a form with three combo boxes.
    These three combo boxes use one ajax store
    So I create a single store, and was connected with the combo boxes.


    And combo boxes request ajax call for indicating data (so three times calling)


    Is there any way that you can perform only once?

  2. do the combos share one instance of a store or the same class?
    one instance might be easier but keep in mind that filters will get shared. so triggerAction: 'all' is recommended.

    make sure that not each combo has listeners to load the store and if the store has the config autoLoad set to true (if the combos share the same class,...).

  3. #2
    Sencha User tobiu's Avatar
    Join Date
    May 2007
    Location
    Munich (Germany)
    Posts
    2,751
    Answers
    130

    Default

    do the combos share one instance of a store or the same class?
    one instance might be easier but keep in mind that filters will get shared. so triggerAction: 'all' is recommended.

    make sure that not each combo has listeners to load the store and if the store has the config autoLoad set to true (if the combos share the same class,...).
    Best regards
    Tobias Uhlig

  4. #3
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,791
    Answers
    585

    Default

    Sharing stores is discussed here:

    http://skirtlesden.com/articles/extjs-comboboxes-part-2

    As the filters are shared you can only really share stores if editable: false is set.

    To avoid loading 3 times you need to set the store to autoLoad: true and the comboboxes to queryMode: 'local'. You should really do that anyway if you're using editable: false.

  5. #4
    Touch Premium Member
    Join Date
    Nov 2011
    Posts
    5

  6. #5
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,791
    Answers
    585

    Default

    The URLs are correct and the sites are all working. I can only assume it is a problem with your connection, the logs show traffic from elsewhere.

    Try the Google cache copy instead:

    http://webcache.googleusercontent.co...boboxes-part-2

    The demos won't all work correctly but at least you'll be able to read the content.

Tags for this Thread

Posting Permissions

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