Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14

Thread: Local Storage - store.remove() doesn't sync Local Store

  1. #11
    Sencha User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Gainesville, FL
    Vote Rating


    remove is working for me on 1.1.0 and removes only that record in local storage.

    You can do a search in the forum and you may see some overrides floating around I made to fix certain bugs in removing.
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Frontend Engineer
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:

  2. #12
    Sencha User
    Join Date
    Apr 2011
    Vote Rating


    K I'm a little confused by this thread - but it is the first result in google and is EXACTLY the problem I am experiencing atm.

    I have Sencha Touch 1.1.0 loaded in Chrome 10 (desktop - for some initial dev work) and as it was records were not getting removed from the Local Storage.

    I am actually using this project that I have modified to run over normal web sockets.

    I hadn't even touched the Ext.Store chunks of code, but now I'm having to add this 'id' field to the store structure - which does indeed magically fix the remove/sync abilities.

    So is it "as designed" that an 'id' field must be present for the store to function properly or is there a problem in 1.1.0 that still needs to be fixed?

    (Or is that demo project just designed bass-ackwards to begin with maybe?)

  3. #13
    Sencha User
    Join Date
    Dec 2011
    Vote Rating


    It's been a year since the last response to this thread. I am having a different kind of problem with the localstorage. The removal of items from local storage works fine but after i remove the last item the local storage becomes unusable.

    In chromes debugger i see the local storage populated with 1 key for the proxy lets say that the proxy's id is
    'favoritesOffersProxy' after i add an item with id 57 i get 2 records. One that is the proxy and another that is the record. After i remove the record the proxy gets deleted also, so the local storage gets unusable and i have to refresh the page to initialize my proxy again... does anyone have any idea how to resolve this?

    this is my store
    app.stores.FavoritesOffersStore = new{
            type: 'localstorage'
    and i delete a record like this

    If you have any questions about what exactly i'm talking about, don't hesitate to contacte me!

    Thank you!

  4. #14
    Sencha User
    Join Date
    Jan 2013
    Vote Rating


    Quote Originally Posted by chummy View Post
    It works for me if I add a field called "id" of type "int" to the model. Sencha Touch will populate the field. It seems, from having a quick look at the code, that Sencha Touch uses this field to identify the instance of the record that it must delete from the store.
    thanks this works for me

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Local Storage
    By tomalex0 in forum Sencha Touch 1.x: Discussion
    Replies: 2
    Last Post: 20 Dec 2010, 6:24 AM
  2. Saving List data to local storage
    By Akhenaten in forum Sencha Touch 1.x: Discussion
    Replies: 6
    Last Post: 19 Dec 2010, 5:36 PM
  3. [FIXED] Invalid id for records loaded from local storage
    By Mis63 in forum Sencha Touch 1.x: Bugs
    Replies: 1
    Last Post: 13 Dec 2010, 10:45 AM
  4. Replies: 2
    Last Post: 3 Jun 2010, 10:53 AM
  5. idea: local storage using Flash Shared objects
    By PromaneX in forum Community Discussion
    Replies: 0
    Last Post: 2 Jun 2008, 4:53 AM

Posting Permissions

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