-
27 Jan 2012 8:24 PM #1
ST2PR2: xtype: list with explicit data is not rendering anything
ST2PR2: xtype: list with explicit data is not rendering anything
I'm trying to render a simple static list in ST2PR2, but I can't seem to nail this down. Is there any reason why this example should be rendering nothing? If I use {html:'hello'} instead of the list, I see 'hello' in the panel, so I'm not sure any of the setup is wrong.
The elements specified by the fixed data store are not added to the DOM (or rendered, obviously). Why?
Code:Ext.define('MoreList', { extend:'Ext.data.Model', fields:[ {name:'text', type:'string'} ] }); var listStore = Ext.create('Ext.data.Store', {model:'MoreList', data:[{text:'hello'}]}); wendler.views.MoreInfoList = { id:'more-info-list-panel', xtype:'panel', items:[ { xtype:'toolbar', title:'More', docked:'top' }, { id:'more-info-list', xtype:'list', useComponents: true, itemConfig: { cls: 'more-info-row' }, itemTpl:'{text}', store:listStore } ] };
-
27 Jan 2012 9:39 PM #2
Remove the useComponents and itemConfig configurations form your list. You do not need them.
There is also a very simple example of the List component in the documentation: http://docs.sencha.com/touch/2-0/#!/....dataview.ListSencha Inc.
Robert Dougan - @rdougan
Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.
-
27 Jan 2012 11:20 PM #3Sencha - Community Support Team
- Join Date
- Jan 2009
- Location
- Palo Alto, California
- Posts
- 1,941
- Vote Rating
- 6
Also be sure to upgrade to PR4, PR2 is rather old...
Ext JS Senior Software Architect
Personal Blog: http://edspencer.net
Twitter: http://twitter.com/edspencer
Github: http://github.com/edspencer
-
28 Jan 2012 11:41 AM #4
I need Sencha IO support, and PR4 has localstorage issues that are supposedly fixed in the beta that broke in PR3. Removing the two config options did nothing; I'll check the example.
-
28 Jan 2012 12:23 PM #5
I found the issue.
I hadn't specified "layout" on the xpanel! Shouldn't this be an error?
Regardless, this is resolved!
-
13 Feb 2012 3:15 AM #6
-
22 Apr 2012 9:18 PM #7
-
5 Oct 2012 6:34 PM #8


Reply With Quote