Note that there are some explanatory texts on larger screens.

plurals
  1. POSencha Touch does not display XML Data
    primarykey
    data
    text
    <p>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.</p> <p>app.js:</p> <pre><code>FRANF = new Ext.Application({ name: 'FRANF', useLoadMask: true, launch: function() { FRANF.homescreenList = new Ext.List({ store: FRANF.ListStore, itemTpl: '&lt;div&gt;{id} {name}&lt;/div&gt;' }); 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] }); } }); </code></pre> <p>index.js:</p> <pre><code>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' } } }); </code></pre> <p>XML:</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8" ?&gt; &lt;items&gt; &lt;item&gt; &lt;id&gt;main-contacts&lt;/id&gt; &lt;name&gt;Kontakte FRA NF&lt;/name&gt; &lt;/item&gt; &lt;item&gt; &lt;id&gt;important-numbers&lt;/id&gt; &lt;name&gt;Lufthansa-Nummern A-Z&lt;/name&gt; &lt;/item&gt; &lt;item&gt; &lt;id&gt;who-does-what&lt;/id&gt; &lt;name&gt;Was finde ich wo?&lt;/name&gt; &lt;/item&gt; &lt;/items&gt; </code></pre> <p>The error console says that the XML file is loaded correctly.</p> <p>You can see my test app here: <a href="http://gopeter.de/sencha/" rel="nofollow">My Sencha Touch App</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload