Note that there are some explanatory texts on larger screens.

plurals
  1. PONestedList won't render
    primarykey
    data
    text
    <p>I'm building an app in Sencha Touch 2 using a PhoneGap wrapper. I'm coding in MVC model, here is the link of the app in a webserver (for debuging): <a href="http://nqatalog.negroesquisso.pt/APP/" rel="nofollow">http://nqatalog.negroesquisso.pt/APP/</a> LOGIN: user: 1, password: 1</p> <p>I have a nested list with a TreeStore to load its data, and .json file with the data.</p> <p>Model</p> <pre><code>Ext.define('APP.model.menuitem',{ extend: 'Ext.data.Model', condig: { fields: ['id', 'name', 'description', 'items'] } }); </code></pre> <p>Store</p> <pre><code>Ext.define('APP.store.nestedmenu', { extend: 'Ext.data.TreeStore', config: { model: 'APP.model.menuitem', autoLoad: true, proxy: { type: 'ajax', url: 'data/menu.json', reader: { type: 'json', rootProperty: 'items' } } } }); </code></pre> <p>View</p> <pre><code>Ext.define('APP.view.MenuNestedList', { extend: 'Ext.dataview.NestedList', xtype: 'menunestedlist', id: 'debug', config: { store: 'nestedmenu' }, }); </code></pre> <p>Another view, calling the previous one</p> <pre><code>Ext.define("APP.view.Leftmenu", { extend: 'Ext.Panel', xtype: 'leftmenu', config: { items: [ { xtype: 'menunestedlist' } ], listeners: { painted: function () { } }, }, onleafitemtap: function() {} }); </code></pre> <p>This nested list renders empty (as you can see and debug if you want in the link above)</p> <p>Thank you for your time.</p> <p>*EDIT (data/menu.json)</p> <pre><code>{ "items": [ { "id": 1, "name": "Section #1", "description": "Lorem ipsum dolor sit", "items": [ { "id": 8, "name": "Product #1", "description": "Lorem ipsum dolor sit", "leaf": true }, { "id": 9, "name": "Product #2", "description": "Lorem ipsum dolor sit", "leaf": true } ] }, { "id": 2, "name": "Section #2", "description": "Lorem ipsum dolor sit", "items": [ { "id": 3, "name": "Section #3", "description": "Lorem ipsum dolor sit", "items": [ { "id": 10, "name": "Product #3", "description": "Lorem ipsum dolor sit", "leaf": true }, { "id": 11, "name": "Product #4", "description": "Lorem ipsum dolor sit", "leaf": true } ] }, { "id": 4, "name": "Section #4", "description": "Lorem ipsum dolor sit", "items": [ { "id": 12, "name": "Product #5", "description": "Lorem ipsum dolor sit", "leaf": true }, { "id": 13, "name": "Product #6", "description": "Lorem ipsum dolor sit", "leaf": true } ] }, { "id": 5, "name": "Section #5", "description": "Lorem ipsum dolor sit", "items": [ { "id": 14, "name": "Product #7", "description": "Lorem ipsum dolor sit", "leaf": true } ] }, { "id": 6, "name": "Section #6", "description": "Lorem ipsum dolor sit", "items": [ { "id": 15, "name": "Product #8", "description": "Lorem ipsum dolor sit", "leaf": true }, { "id": 16, "name": "Product #9", "description": "Lorem ipsum dolor sit", "leaf": true }, { "id": 17, "name": "Product #10", "description": "Lorem ipsum dolor sit", "leaf": true } ] } ] }, { "id": 7, "name": "Section #7", "description": "Lorem ipsum dolor sit", "items": [ { "id": 18, "name": "Product #11", "description": "Lorem ipsum dolor sit", "leaf": true }, { "id": 19, "name": "Product #12", "description": "Lorem ipsum dolor sit", "leaf": true }, { "id": 20, "name": "Product #13", "description": "Lorem ipsum dolor sit", "leaf": true } ] } ] } </code></pre>
    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.
    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