1. #1
    Sencha User
    Join Date
    Mar 2012
    Posts
    36
    Vote Rating
    0
    mainstream is on a distinguished road

      0  

    Default Unanswered: Store : append records

    Unanswered: Store : append records


    Hello,
    I'm working on an application with sencha 2.0, and I have a problem with the store. I have a json store,and I load json files from a server. I set the url of store with a button to load more data. I want the store to not remove old records, and just append the others, but i cant. I try clear OnPageLoad but it dont work.

    Does
    anyone know a easy way to do this? should I use a plugin or something like that?
    I dont want paging...,just a way to avoid removing the old records.

    please help.

  2. #2
    Sencha User
    Join Date
    Feb 2012
    Location
    Switzerland
    Posts
    20
    Answers
    1
    Vote Rating
    0
    ofranky is on a distinguished road

      0  

    Default


    Maybe you could try to uncomment the following line: In Store.js
    onProxyLoad()
    ...
    this.fireAction('datarefresh', [this, this.data, operation], 'doDataRefresh');
    ...

    But yes, this is really quick-and-dirty and there is probably a much better solution out there... but I don't have it... sry

  3. #3
    Sencha User
    Join Date
    Mar 2012
    Posts
    36
    Vote Rating
    0
    mainstream is on a distinguished road

      0  

    Default


    Thanks for the quick reply! but i have a probleme, where can i find the store.js? ( sencha 2 lib?) sorry am a beginner so...

  4. #4
    Sencha User
    Join Date
    Feb 2012
    Location
    Switzerland
    Posts
    20
    Answers
    1
    Vote Rating
    0
    ofranky is on a distinguished road

      0  

    Default


    well, i wouldn't recommend to change the framework (but sometimes its a good way to learn how things work behind the scene ).
    In case you want to try that: you have to use sencha-touch-debug.js in your index.html
    and you can find the store under /src/data/store.js

  5. #5
    Sencha User
    Join Date
    Mar 2012
    Posts
    36
    Vote Rating
    0
    mainstream is on a distinguished road

      0  

    Default


    thanks! i will try that. but, if someone else has another idea...

  6. #6
    Sencha - Services Team AndreaCammarata's Avatar
    Join Date
    Jun 2009
    Posts
    1,394
    Answers
    148
    Vote Rating
    22
    AndreaCammarata has a spectacular aura about AndreaCammarata has a spectacular aura about

      0  

    Default


    Quote Originally Posted by mainstream View Post
    Hello,
    I'm working on an application with sencha 2.0, and I have a problem with the store. I have a json store,and I load json files from a server. I set the url of store with a button to load more data. I want the store to not remove old records, and just append the others, but i cant. I try clear OnPageLoad but it dont work.

    Does
    anyone know a easy way to do this? should I use a plugin or something like that?
    I dont want paging...,just a way to avoid removing the old records.

    please help.
    Hello,
    please check this discussion.
    http://www.sencha.com/forum/showthread.php?195641-sencha-touch-store

    Hope this helps
    Sencha Inc
    Andrea Cammarata, Solutions Engineer
    CEO at SIMACS

    @AndreaCammarata
    www.andreacammarata.com
    github: https://github.com/AndreaCammarata

    TUX components bundle for Sencha Touch 2.x.x
    http://www.tux-components.com/


Thread Participants: 2