Results 1 to 3 of 3

Thread: How to access value sent to store.load() by ComboBox?

  1. #1
    Sencha User
    Join Date
    Dec 2011
    Posts
    26
    Vote Rating
    0
      0  

    Question Answered: How to access value sent to store.load() by ComboBox?

    Hi All -

    I'm certain that this is something I should be able to do, but I just can't quite find the right variable.

    I am setting up a ComboBox to load data from a remote store. however, I can't easily use one of the built-in proxies (i.e. jsonp, ajax, etc) since I'm relying on some legacy code that takes care of the actual messaging. So, what I need to do is be able to figure out what value the ComboBox is sending to store.load(), that would normally be sent to the proxy.

    I have extended Store, and have overridden the load() method, so I've got all the logic I need, I just can't figure out how to access what ComboBox is sending to store.load() that normally goes in the params and such I guess?

    Code:
    load: function ()
     {
      try
      {
       this.removeAll(); //clear the store...
       var matches  = AbstractItemSearch.runIntellisenseSearch(???); //how to get parm sent to store load from ComboBox?
       var matchesArr = new Array();
       for (var x = 0; x < matches.length; x++)
        matchesArr[x] = Ext.create("ItemSearchModel", { itemNum: matches[x], itemDesc: 'Description...' });
       this.add(matchesArr); //add all to the Store.
      }
      catch (e)
      {
       this.removeAll();
       alert("Error getting items:" + e.description);
      }
     }
    I tried looking for this.extraParams and such, but just couldn't quite find it. Is it there, or do I need to be looking somewhere else to figure out where ComboBox is sending the user-typed text on to the store for querying/loading?

    Cheers,

    -J

  2. Take a look at doQuery:

    http://docs.sencha.com/ext-js/4-0/so...method-doQuery

    Specifically the call to store.load(...) should point you in the right direction.

  3. #2
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,791
    Answers
    585
    Vote Rating
    394
      0  

    Default

    Take a look at doQuery:

    http://docs.sencha.com/ext-js/4-0/so...method-doQuery

    Specifically the call to store.load(...) should point you in the right direction.

  4. #3
    Sencha User
    Join Date
    Dec 2011
    Posts
    26
    Vote Rating
    0
      0  

    Default

    Perfect, thank you, found what I needed: params.query

    I'm new enough with ExtJS that I didn't notice the ability to check the source directly in the docs page like you linked - thank you. Teach a man to fish and all that ;-)

    Cheers,

    -Jake

Posting Permissions

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