1. #1
    Sencha User
    Join Date
    Apr 2012
    Location
    Billerica, MA
    Posts
    60
    Vote Rating
    9
    jattardi will become famous soon enough

      0  

    Default Unanswered: List refresh issues - refreshFn gone from PullRefresh plugin

    Unanswered: 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 - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,207
    Answers
    3517
    Vote Rating
    858
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      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 @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Apr 2012
    Location
    Billerica, MA
    Posts
    60
    Vote Rating
    9
    jattardi will become famous soon enough

      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.

Thread Participants: 1

Tags for this Thread