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 6703965
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T07:14:02+00:00 2026-05-26T07:14:02+00:00

I have setup a SenchaTouch/PhoneGap app that pulls information from an external XML feed.

  • 0

I have setup a SenchaTouch/PhoneGap app that pulls information from an external XML feed. My problem is this will obviously only work when online.

How do I go about storing the information from the external feed in the local storage to be used offline?

Here is the app data store code:

App.eventstore = new Ext.data.Store({
    model: 'Event',
    sorters: 'title',
    autoLoad: true,

    getGroupString : function(record) {
        return record.get('title')[0];
    },

    proxy: {
        type: 'ajax',
        url: 'http://the-url-to-the-file.xml',
        reader: {
            idProperty: 'id',
            type: 'xml',
            root: 'events',
            record: 'event'
        }
    }
});
App.eventstore.read();

Update after Ilya139’s answer:

I’ve implemented the code, but now my list is empty… 🙁

Store

App.eventstore = new Ext.data.Store({
    model: 'Event',
    sorters: 'title',
    autoLoad: true,

    getGroupString : function(record) {
        return record.get('title')[0];
    },

    proxy: {
        type: 'ajax',
        url: 'http://the-url-to-the-file.xml',
        reader: {
            idProperty: 'id',
            type: 'xml',
            root: 'events',
            record: 'event'
        }
    }
});

App.eventstore.read();

App.eventstore.each(function(record){record.save();});

App.offlineeventstore = new Ext.data.Store({
    model: 'Event',
    sorters: 'title',
    autoLoad: true,

   getGroupString : function(record) {
    return record.get('title')[0];
   },

   proxy: {
      type: 'localstorage',
      id:'events'
    }
});

App.offlineeventstore.read();

Model

Ext.regModel('Event', {
    fields: [
        {name: 'id', mapping: '@id', type: 'integer'},
        {name: 'title', type: 'string'},
        etc etc...
    ],

    proxy: {
       type: 'localstorage',
       id:'events'
    }

});

And the list is set to use the offline store:

items: [{
        xtype: 'list',
        store: App.offlineeventstore,
        itemTpl: '{title}',
        grouped: true,
        indexBar: true,
  • 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-05-26T07:14:02+00:00Added an answer on May 26, 2026 at 7:14 am

    Add this to the Event model:

     proxy: {
           type: 'localstorage',
           id:'events'
        }
    

    And then for each event that you download call save() like this:

     App.eventstore.each(function(record){record.save();});
    

    Then to load:

     App.offlinestore = new Ext.data.Store({
         model: 'Event',
        sorters: 'title',
        autoLoad: true,
    
       getGroupString : function(record) {
        return record.get('title')[0];
       },
       proxy: {
           type: 'localstorage',
          id:'events'
    }});
    

    Update

    App.eventstore.load(function(){
       App.eventstore.each(function(record){record.save();});
       offlineeventstore.load();
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have setup a basic app which pulls down a JSON stream and displays
I have setup a Symfony 2 Data Transformer that will allow the user to
I have setup a simple Oracle external table test that I (alongside a DBA
I have setup my windows in a certain way. How do I save this
i have setup a profanity filter with bad words in a XML file and
I have setup a postfix mail receiving server. On this I am using DKIM
I have setup a Visual Studio project that I have edited to reference the
I have setup a test database and console app to confirm the following: Given
I have setup .htaccess to redirect me.example.com to example.com/fun/index.php. This index.php has a session.
I have setup my project in SVN to use an external library. When I

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.