Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7967083
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T06:36:17+00:00 2026-06-04T06:36:17+00:00

I have two stores: localstorage and a json on the server, I’m trying to

  • 0

I have two stores: localstorage and a json on the server, I’m trying to download data from json to the local. Please see what’s wrong:

/store/Notes.js

Ext.define("NotesApp.store.Notes", {
    extend: "Ext.data.Store",
    requires: "Ext.data.proxy.LocalStorage",
    config: {
        storeId: 'Notes',
        model: "NotesApp.model.Note",
        proxy: {
            type: 'localstorage',
            id: 'notes-app-store'
        },
        sorters: [{
            property: 'dateCreated',
            direction: 'DESC'
        }],
        grouper: {
            sortProperty: "dateCreated",
            direction: "DESC",
            groupFn: function (record) {

                if (record && record.data.dateCreated) {
                    return record.data.dateCreated.toDateString();
                } else {
                    return '';
                }
            }
        }
    }
});

/store/Online.js

Ext.define(“NotesApp.store.Online”, {
extend: “Ext.data.Store”,
config: {

       storeId: 'Online',
       proxy: {
           type: 'jsonp',
           url: 'http://server.com/made/qa.php',
           reader: {
               type: 'json'
               //rootProperty: 'results'
           }
       },
       autoLoad: false,
       listeners: {
           load: function() {   
                console.log("updating");
               // Clear proxy from offline store
               Ext.getStore('Notes').proxy.clear();
               console.log("updating1");
               // Loop through records and fill the offline store
               this.each(function(record) {
                         console.log("updating2");
                         Ext.getStore('Notes').add(record.data);

               });

               // Sync the offline store
               Ext.getStore('Notes').sync();
               console.log("updating3");
               // Remove data from online store
               this.removeAll();
                console.log("updated");
           }

       },
       fields: [
                {
                name: 'id'
                },
                {
                name: 'date_created'
                },
                {
                name: 'question'
                },
                {
                name: 'answer'
                },
                {
                name: 'type'                    
                },
                {
                name: 'author'
                }
                ]
       } });

When I need to update I called Ext.getStore('Online').load();

But the console is not showing anything else after ‘updating’.

I wonder what went wrong?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T06:36:18+00:00Added an answer on June 4, 2026 at 6:36 am

    Use Ext.getStore('Notes').getProxy().clear() instead works

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two tables: stores raw_stores_data The raw_stores_data is received from a third party
I have two database tables. One table stores data for a commitment that a
I have two classes. SpeciesReader takes files and parses them. Species stores certain data
I have two entities - UserObj and Producer. UserObj stores user-related profile data Producer
I have two DB's one is feed by filtered data from another, now i'm
I have two Access databases: Main stores most of my data and Memos stores
In my program I have two classes: Collector and Entity. Collector stores Entities in
I have two tables: Stores and Items. The relationship is: Stores 1---* Items In
I have two tables, one stores user sessions and the other stores shopping cart
I have two tables, one that stores serial number uut_build , and another for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.