Results 1 to 3 of 3

Thread: List refresh issues - refreshFn gone from PullRefresh plugin

  1. #1
    Sencha User
    Join Date
    Apr 2012
    Location
    Billerica, MA
    Posts
    60
    Vote Rating
    10
      0  

    Default List refresh issues - refreshFn gone from PullRefresh plugin

    Hi all,

    By what sorcery does the PullRefresh list plugin refresh the data? When one of the items in the list goes away on the server, it is not removed from the list when I refresh it via pull-to-refresh. However, if I explicitly refresh the store, i.e. I call Ext.getStore('Servers').load(), the data is refreshed properly and the removed item disappears as expected.

    I had been resolving this issue by specifying a refreshFn function on the PullRefresh plugin that gets the list's store and calls load(). When this stopped working, I was surprised to find that refreshFn was removed in the latest version of Touch.

    How can I accomplish this now? Can I just override the fetchLatest function? It seemed to work when I gave it a quick test, but I don't know if I broke something else by doing that.

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,556
    Answers
    3932
    Vote Rating
    1272
      0  

    Default

    The pullrefresh plugin only seems to handle updated or new records. It loads the data outside of the store then iterates through the records returned and tries to match it with the ones in the store. If a match is found, it will update the data, if one is not found then it will add the record to the store.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  3. #3
    Sencha User
    Join Date
    Apr 2012
    Location
    Billerica, MA
    Posts
    60
    Vote Rating
    10
      0  

    Default

    Thanks for the explanation. Do you see any issues with overriding the fetchLatest function in PullRefresh to just call load() on the Store? As I said, it seems to work without issue, but I don't know if that broke something else.

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
  •