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

  • Home
  • SEARCH
  • 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 7441235
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T10:58:42+00:00 2026-05-29T10:58:42+00:00

I am attempting to add a List component to a view in Sencha Touch.

  • 0

I am attempting to add a List component to a view in Sencha Touch. The app runs correctly until I try to add the list component. After Adding the list to the view the app loads (shows the splash screen)then only shows a white screen.

I’m using Sencha Touch, XCode 4, iOS 5 SDK, and PhoneGap 1.3.0.

Thanks in advance!

here’s the code for the view:

plantanalyzer.views.BuildingList = Ext.extend(Ext.Panel, {
dockedItems: [{
            dock: 'top',
            html: '<img src="images/logo.jpg"/>'
        },
        {
        xtype: 'list',
        itemTpl : '{name}',
        grouped : true,
        indexBar: true,
        store: newStore

    }]
});

and the code for my test datastore. I have this in the head of index.html:

var newStore;

    function onBodyLoad(){
        Ext.regModel('Plants', {
            fields: ['name', 'efficiency']
        });

        newStore = new Ext.data.JsonStore({
            model  : 'Plants',
            sorters: 'name',

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

            data: [
                {name: 'Milwaukee',   efficiency: .85},
                {name: 'New York',    efficiency: .65},
                {name: 'St Paul',     efficiency: .73},
                {name: 'Phoenix',     efficiency: .35},
                {name: 'Los Angeles', efficiency: .45},
                {name: 'Miami',       efficiency: .75},
                {name: 'London',      efficiency: .39},
                {name: 'Moscow',      efficiency: .95},
                {name: 'Hogwarts',    efficiency: .99}
            ]
        });
    }
  • 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-29T10:58:43+00:00Added an answer on May 29, 2026 at 10:58 am

    You create your store on body load, i.e. after the list was loaded so the newStore object is empty when the list needed.
    Put this code:

     Ext.regModel('Plants', {
            fields: ['name', 'efficiency']
        });
    
        newStore = new Ext.data.JsonStore({
            model  : 'Plants',
            sorters: 'name',
    
            getGroupString : function(record) {
                return record.get('name')[0];
            },
    
            data: [
                {name: 'Milwaukee',   efficiency: .85},
                {name: 'New York',    efficiency: .65},
                {name: 'St Paul',     efficiency: .73},
                {name: 'Phoenix',     efficiency: .35},
                {name: 'Los Angeles', efficiency: .45},
                {name: 'Miami',       efficiency: .75},
                {name: 'London',      efficiency: .39},
                {name: 'Moscow',      efficiency: .95},
                {name: 'Hogwarts',    efficiency: .99}
            ]
        });
    

    Right before:

    plantanalyzer.views.BuildingList = Ext.extend(Ext.Panel, {
    dockedItems: [{
                dock: 'top',
                html: '<img src="images/logo.jpg"/>'
            },
            {
            xtype: 'list',
            itemTpl : '{name}',
            grouped : true,
            indexBar: true,
            store: newStore
    
        }]
    });
    

    To check if this is really the case.

    One other suggestion is that you should put the list in the items of the panel, not the dockedItems.
    Btw, your code is not well structured. You should follow the MVC patter.
    Check this https://vimeo.com/17705448 and this http://www.sencha.com/learn/a-sencha-touch-mvc-application-with-phonegap/.

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

Sidebar

Related Questions

On 2.7.5.final, I'm attempting to add a Iterable list of Ints like so def
I'm attempting to add searching support for my PHP web app using MySQL's FULLTEXT
I am attempting to add some entities that I have created. When I try
I am attempting to add a No Preference choice to my check box list
Attempting to recursively add XElements stepping through a category list. XElement dataResponse = new
I'm attempting to take the different values in a list, add them up and
I've been attempting to work out how to add a child View to a
I'm attempting to add a class to a group of floated list items on
I am attempting add a tableadapter to a stored procedure in my SQL Server
I am attempting add some tests to an existing QT GUI application using QTest.

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.