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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:07:27+00:00 2026-05-26T23:07:27+00:00

I’m just working on a web application with sencha touch. I need to implement

  • 0

I’m just working on a web application with sencha touch. I need to implement a store (bound to a grid) which is offline available (offlineStorage) but fetches & updates data online (REST) as soon as the internet connection is available. This is necessary since I have a lot of data and I do a lot remote filtering and searching on the store. I cannot load the full store from the beginning because it is too large. Preferably I’d love to use a offlineStore for a fast user experience. New filters/requests should request data from the server (online store) and update/add it to the offlineStorage to keep in sync to the server.

Grid <-bind-> Store (offlineStorage) <-request remote data on new filter-> online Store

A starting point for me is http://www.sencha.com/learn/taking-sencha-touch-apps-offline/#leave-reply. However I need to trigger the online store as soon as data is loaded from the offline storage or a filter is set.

Has anyone implemented something like this yet? Any hints/ideas how to implement it?

I really appreciate your help!!

  • 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-26T23:07:28+00:00Added an answer on May 26, 2026 at 11:07 pm

    Within Sencha Touch it’s really quite easy to ‘synchronize’ and online store with the fetched data to another ‘offline’ store.

    Define an offline store:

        // Offline store (local storage)
        var schouwLijstOffline = new Ext.data.Store({
            model: "schouwLijst",
            storeId: 'schouwLijstOffline',
            proxy: {
                type: 'localstorage',
                id: "schouwid"
            },
        });
    

    You can now use a listener on your main store (first fetch of data) and listen to the load event (in this case manually triggered because of the ‘ autoLoad: false’.

    Within the loader you ‘clear()’ the proxy of the offlinestore and then fill the offline store with data with the ‘storeId‘*.add()* function.

    In my example I then delete all the information from the ‘offlinestore’ as I don’t need it anymore (it’s in the offline one now.

    Online store with listener:

    var schouwLijstStore = new Ext.data.Store({
    
                model: "schouwLijst",
                storeId: "schouwLijstStore",
                proxy: {
                    type: 'ajax',
                    url: 'php/json.php?t=list',
                    reader: {
                        type: 'json',
                        root: 'list'
                    },   
                },    
                autoLoad: false,
                listeners: {
                    load: function() {
    
                        // Clear proxy from offline store
                        schouwLijstOffline.proxy.clear();
    
                        // Loop through records and fill the offline store
                        this.each(function(record) {
    
                            schouwLijstOffline.add(record.data);
    
                        });
    
                        // Sync the offline store
                        schouwLijstOffline.sync();
    
                        // Remove data from online store
                        schouwLijstStore.removeAll();
    
                    }
    
                }
    
            });
    

    Now when you do a new request to fetch new filters/data you can repeat the same process:

    • Trigger online store (storeId.update();)
    • Listener adds the data from the online store to the offlinestore
    • Use the offlinestore

    Supplemental:

    To remove all the data from an store you can use: storeId.removeAll();

    I think this will get you along in the right direction, if something is unclear please say so.

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

Sidebar

Related Questions

I have just tried to save a simple *.rtf file with some websites and
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I am trying to understand how to use SyndicationItem to display feed which is
I used javascript for loading a picture on my website depending on which small
Seemingly simple, but I cannot find anything relevant on the web. What is the
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I need to clean up various Word 'smart' characters in user input, including but
I have a text area in my form which accepts all possible characters from
I need a function that will clean a strings' special characters. I do NOT

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.