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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T07:39:56+00:00 2026-05-30T07:39:56+00:00

I have a Sencha Touch 2.0 app that is set up with a card

  • 0

I have a Sencha Touch 2.0 app that is set up with a card layout. It contains a dashboard with icons the user can click on and a customer list (xtype: ‘list’). When the app is loaded I load all of the ‘cards’ in the app including the Customer List, but I don’t load the data (via proxy) unless a localStorage variable is set. After everything is loaded I check to see if the user should be logged in automatically by checking the localStorage variable. If they are automatically logged in then my app works perfectly. If they aren’t I show them the “login” card, which is basically a login form. Once they submit this log in form I perform an ajax call. If this comes back correctly I send them to the “dashboard” card. But before that I am trying to load the customer list via an ajax call using:

var tmpId = { id: example.id };

var cListStore = Ext.create('example.store.CustomerList');
cListStore.getProxy().setExtraParams(tmpid);
cListStore.load();

With the code above I can see that my proxy call is happening, and I can see the response is correct. However, when I see the dashboard, and I click on the Customers icon I see an empty list. My toolbar is there and even the indexBar on my list is there, just no data. I’m not sure what I’m doing wrong here. I am including my list view, store, and model below, hopefully that will help anyone who looks at this:

Ext.define('example.view.CustomerList', {
    extend: 'Ext.Container',
    id: 'customerListContainer',
    xtype: 'customerlist',
    config: {
        layout: 'fit',
        items: [{
            xtype: 'toolbar',
            docked: 'top',
            title: 'Customers',
            items: [{
                xtype: 'button',
                text: 'Home',
                id: 'customerListHomeButton',
                ui: 'back'
            }]
        }, {
            xtype: 'list',
            itemTpl: '<div class="contact">{first_name} <strong>{last_name}</strong>  </div>',
            store: 'CustomerList',
            id: 'customer_list',
            grouped: true,
            indexBar: true
        }]
    }
});

Ext.define('example.store.CustomerList', {
    extend: 'Ext.data.Store',
    id: 'customerListStore',
    requires: ['example.model.CustomerList'],
    config: {
        model: 'example.model.CustomerList',
        sorters: 'last_name',
        /*
         * This actually makes the ajax request
         */
        proxy: {
            type: 'ajax',
            url: '/example/api/customerList.php',
            extraParams: {
                id: example.id
            },
            reader: {
                type: 'json'
            }
        },
        autoLoad: ((example.id > 0) ? true : false), //only fetch the data if we have a id, or else we'll get an error from our api

        /*
         * Set the group headers to the first letter of the last name
         */
        grouper: {
            groupFn: function (record) {
                return record.get('last_name')[0];
            }
        }
    }
});

Ext.define('example.model.CustomerList', {
    extend: 'Ext.data.Model',
    config: {
        /*
         * Define the fields we get back from our ajax request
         */
        fields: [
            'first_name',
            'last_name',
            'address1',
            'address2',
            'city',
            'state',
            'zip_code',
            'phone_daytime',
            'phone_evening',
            'phone_cell',
            'email']
    }
});

I have also tried to put a storeId in the Customer List store and then use the following code instead of calling Ext.create():

Ext.StoreManager.get('storeid').load()

This produced the same results. I could see the proxy was fetching the data correctly but it still was rendering in my list component.

  • 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-30T07:39:57+00:00Added an answer on May 30, 2026 at 7:39 am

    I figured it out, I removed these lines:

    var cListStore = Ext.create('example.store.CustomerList');
    cListStore.getProxy().setExtraParams(tmpid);
    cListStore.load();
    

    and I added the following in its place:

    Ext.getStore('CustomerList').getProxy().setExtraParams(tmpid);
    Ext.getStore('CustomerList').load();
    

    Basically I didn’t need to create a new instance of my store, one was already created so I just needed a way to identify it (Ext.getStore) and then load it. Thanks for everyone who looked into it.

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

Sidebar

Related Questions

I have a Sencha Touch App that loads data from a REST service into
I have an app that has several different pages that use Sencha Touch. Ocassionally
In Sencha Touch, I often need to have an Ext.DataView panel that contains a
I have a Sencha Touch app that works great in desktop Chrome, mobile Safari,
I have a MVC-styled sencha touch app and normally I used Ext.apply(app.views, { loginPage:
I have a Sencha Touch 1.1/Phonegap 1.3 application that works correctly on the iPad
Im writing a Sencha touch app that I want to show a popup box
On perusing the Sencha Touch kitchen sink, I noticed that they have somehow disabled
Hullo there, I am building a Sencha Touch iPhone app that utilises a TreeStore
i have a simple sencha touch app in mvc style with one view in

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.