-
14 Mar 2012 9:41 AM #1
Unanswered: List isn't rendering data
Unanswered: List isn't rendering data
If I try to include a list in a container as part of the items array, the list does not render its data properly.
The following list works correctly:
However, when I try to use a list like so, it doesn't work.Code:Ext.define('App.view.SpacesView', { extend: 'Ext.List', xtype: 'spacesview', config: { title: 'Spaces', fullscreen: true, store: 'SpacesStore', itemTpl: '{name}', onItemDisclosure: true } });
I have tried everything I can think of including manually calling refresh on the list. It works if the list is the main component, but if I try to include it in the container, it does not work.Code:Ext.define('App.view.MilestonesView', { extend: 'Ext.Container', xtype: 'milestonesview', config: { title: 'Milestones', fullscreen: true, layout: { type: 'vbox', align: 'center', pack: 'center' }, items: [ { xtype: 'milestoneslist' }, { xtype: 'button', width: 'auto', text: 'See All Tickets' } ] } }); Ext.define('App.view.MilestonesList', { extend: 'Ext.List', xtype: 'milestoneslist', config: { fullscreen: true, itemTpl: '{name}', store: 'MilestonesStore', onItemDisclosure: true } });
-
14 Mar 2012 12:59 PM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,582
- Vote Rating
- 434
- Answers
- 3102
Are you using Sencha Touch 1 or 2?
I'm assuming 2. First in MilestonesList you shouldn't have have fullscreen config set. You should have flex or a height/width set on it so that MilestonesView can give it a size.Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
14 Mar 2012 12:59 PM #3Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,582
- Vote Rating
- 434
- Answers
- 3102
Moved to ST2 Q&A forum.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
14 Mar 2012 1:04 PM #4
Sorry yeah this is Sencha Touch 2. I took out fullscreen from the list and tried some different width / height / flex values (although I just want it to take up the full width and however much height it needs). It is still not rendering any data. The list is being created correctly and I can see the right divs in the DOM, but it has no items. I double checked the store and the store that is supposed to be supplying it with data does in fact have items. Calling getStore on the list returns the correct store as well.


Reply With Quote