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

The Archive Base Latest Questions

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

I am writing an application with Sencha Touch. So I read a XML file

  • 0

I am writing an application with Sencha Touch. So I read a XML file and put the data in a list view. Unfortunately, my app doesn’t show any list items. I have no errors in my console log and I’ve done everything according to the documentation.

app.js:

FRANF = new Ext.Application({
name: 'FRANF',
useLoadMask: true,
launch: function() {

    FRANF.homescreenList = new Ext.List({
        store: FRANF.ListStore,
        itemTpl: '<div>{id} {name}</div>'
    });

    FRANF.homescreenListToolbar = new Ext.Toolbar({
        id: 'homescreenToolbar',
        title: 'FRA NF'
    });

    FRANF.homescreenListContainer = new Ext.Panel({
        id : 'itemListContainer',
        layout : 'fit',
        html: 'This is the notes list container',
        dockedItems: [FRANF.homescreenListToolbar],
        items: [FRANF.homescreenList]      
    });

    FRANF.viewport = new Ext.Panel({
        fullscreen : true,
        layout : 'card',
        cardAnimation : 'slide',
        items: [FRANF.homescreenListContainer]
    });     
}
});

index.js:

Ext.regModel('Contact', {
    fields: ['id', 'name']
});

FRANF.ListStore = new Ext.data.TreeStore({
    model: 'Contact',
    autoLoad: true,
    proxy: {
        type: 'ajax',
        url : 'homescreen.xml',
        reader: {
            type: 'xml',
            root: 'items',
            record: 'item'
        }
    }
});

XML:

<?xml version="1.0" encoding="UTF-8" ?>
<items>
    <item>
        <id>main-contacts</id>
        <name>Kontakte FRA NF</name>
    </item>
    <item>
        <id>important-numbers</id>
        <name>Lufthansa-Nummern A-Z</name>
    </item>
    <item>
        <id>who-does-what</id>
        <name>Was finde ich wo?</name>
    </item>
</items>

The error console says that the XML file is loaded correctly.

You can see my test app here: My Sencha Touch App

  • 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:19:27+00:00Added an answer on May 29, 2026 at 10:19 am

    Your link doesn’t contain the code you have provided. In the link you are using this xml file:

    <?xml version="1.0" encoding="UTF-8"?>
    <item>
        <mail>1</mail>
        <name>Ed Spencer</name>
    </item>
    <item>
        <mail>2</mail>
        <name>Abe Elias</name>
    </item>
    

    Which you can see is invalid. Try grouping them under one element root for example ‘items’ i.e.:

    <?xml version="1.0" encoding="UTF-8"?>
    <items>
        <item>
            <mail>1</mail>
            <name>Ed Spencer</name>
        </item>
        <item>
            <mail>2</mail>
            <name>Abe Elias</name>
        </item>
    </items>
    

    Then what’s your real problem is this line:

     franf.homescreenList = new Ext.List({
                id: 'homescreenitems',
                store: franf.homescreenItemsStore,
                grouped: true,                       // <- this Line
                itemTpl: '<div class="item">{mail} {name}</div>'
            });
    

    You see you’re grouping the list items but you don’t provide metric on how to group them. Comment it out and you will get running app.

    Also modify your proxy’s reader like this:

     reader: {
                type: 'xml',
                record: 'item',
                root: 'items'
            }
    

    To get them grouped check this http://docs.sencha.com/touch/1-1/#!/api/Ext.List You have example there how to group the items.

    Btw Sencha Touch 2 is in beta now, so I suggest use that – learn that instead of 1.1.

    Here is your whole working code:

    franf = new Ext.Application({
        name: 'franf',
        useLoadMask: true,
        launch: function() {
    
            franf.homescreenList = new Ext.List({
                id: 'homescreenitems',
                store: franf.homescreenItemsStore,
               // grouped: true,
                itemTpl: '<div class="item">{mail} {name}</div>'
            });
    
            // Header Toolbar erzeugen
            franf.homescreenListToolbar = new Ext.Toolbar({
                id: 'homescreenToolbar',
                title: 'FRA NF'
            });
    
            // Fullscreen Panel erzeugen
            franf.homescreenListContainer = new Ext.Panel({
                id : 'itemListContainer',
                fullscreen: true,
                layout : 'fit',
                dockedItems: [franf.homescreenListToolbar],
                items: [franf.homescreenList]      
            });
        }
    });
    
    Ext.regModel('Items', {
        fields: ['mail', 'name']
    });
    
    franf.homescreenItemsStore = new Ext.data.Store({
        model: 'Items',
        autoLoad: true,
        proxy: {
            type: 'ajax',
            url : 'homescreen.xml',
            reader: {
                type: 'xml',
                record: 'item',
                root: 'items'
            }
        },
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am writing an application using Sencha Touch that will require a login to
Am writing an application for iphone to read a text file using NSData. NSFileHandle
I am writing a native iPhone and Android app using Sencha Touch inside Phonegap
I'm writing application for downloading CSV file from web and inserting data into table
I am writing an application that needs to bring window of an external app
I am writing an application that is accepting POST data from a third party
I am writing an application in C# that reads info from a .mdb file
Im writing WPF application and want to add ability to call jump list and
Writing an application for a custom gallery, and all the script files are put
I'm writing application which consists of server side on Google App Engine (Java) and

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.