-
13 Dec 2011 10:19 AM #1
Answered: All preview versions of ST2 not working with Dataview example
Answered: All preview versions of ST2 not working with Dataview example
Can someone help me out here. I cannot get the example to work in 'examples/view/' folder of the sencha download. The page just shows up blank. I have tried using pr1- pr3 but no avail. I dont get any errors either so its impossible to debug
All the 'x-dataview-item' divs are being rendered but the divs are empty.
Thanks!
-
Best Answer Posted by mitchellsimoens
Looking at the examples/dataview/dataview/index.html, the error is in the way the template is specified. It should be like this (at the bottom):
The same goes for the list one.Code:var myStore = Ext.create('Ext.data.JsonStore', { id: 'myStore', fields: ['firstName', 'lastName'], data: [ {firstName: 'Tommy', lastName: 'Maintz'}, {firstName: 'Ed', lastName: 'Spencer'}, {firstName: 'Jamie', lastName: 'Avins'}, {firstName: 'Aaron', lastName: 'Conran'}, {firstName: 'Dave', lastName: 'Kaneda'}, {firstName: 'Michael', lastName: 'Mullany'}, {firstName: 'Abraham', lastName: 'Elias'}, {firstName: 'Tommy', lastName: 'Maintz'}, {firstName: 'Ed', lastName: 'Spencer'}, {firstName: 'Jamie', lastName: 'Avins'}, {firstName: 'Aaron', lastName: 'Conran'}, {firstName: 'Dave', lastName: 'Kaneda'}, {firstName: 'Michael', lastName: 'Mullany'}, {firstName: 'Abraham', lastName: 'Elias'}, {firstName: 'Tommy', lastName: 'Maintz'}, {firstName: 'Ed', lastName: 'Spencer'}, {firstName: 'Jamie', lastName: 'Avins'}, {firstName: 'Aaron', lastName: 'Conran'}, {firstName: 'Dave', lastName: 'Kaneda'}, {firstName: 'Michael', lastName: 'Mullany'}, {firstName: 'Abraham', lastName: 'Elias'}, {firstName: 'Tommy', lastName: 'Maintz'}, {firstName: 'Ed', lastName: 'Spencer'}, {firstName: 'Jamie', lastName: 'Avins'}, {firstName: 'Aaron', lastName: 'Conran'}, {firstName: 'Dave', lastName: 'Kaneda'}, {firstName: 'Michael', lastName: 'Mullany'}, {firstName: 'Abraham', lastName: 'Elias'}, {firstName: 'Tommy', lastName: 'Maintz'}, {firstName: 'Ed', lastName: 'Spencer'}, {firstName: 'Jamie', lastName: 'Avins'}, {firstName: 'Aaron', lastName: 'Conran'}, {firstName: 'Dave', lastName: 'Kaneda'}, {firstName: 'Michael', lastName: 'Mullany'}, {firstName: 'Abraham', lastName: 'Elias'}, {firstName: 'Tommy', lastName: 'Maintz'}, {firstName: 'Ed', lastName: 'Spencer'}, {firstName: 'Jamie', lastName: 'Avins'}, {firstName: 'Aaron', lastName: 'Conran'}, {firstName: 'Dave', lastName: 'Kaneda'}, {firstName: 'Michael', lastName: 'Mullany'}, {firstName: 'Abraham', lastName: 'Elias'}, {firstName: 'Jay', lastName: 'Robinson'} ] }); Ext.create('Ext.Panel', { fullscreen: true, layout: 'fit', items: { xtype: 'dataview', id: 'dv2', store: myStore, itemTpl: '<div>{lastName}, {firstName}</div>' } });
-
13 Dec 2011 12:15 PM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,656
- Vote Rating
- 435
- Answers
- 3108
Looking at the examples/dataview/dataview/index.html, the error is in the way the template is specified. It should be like this (at the bottom):
The same goes for the list one.Code:var myStore = Ext.create('Ext.data.JsonStore', { id: 'myStore', fields: ['firstName', 'lastName'], data: [ {firstName: 'Tommy', lastName: 'Maintz'}, {firstName: 'Ed', lastName: 'Spencer'}, {firstName: 'Jamie', lastName: 'Avins'}, {firstName: 'Aaron', lastName: 'Conran'}, {firstName: 'Dave', lastName: 'Kaneda'}, {firstName: 'Michael', lastName: 'Mullany'}, {firstName: 'Abraham', lastName: 'Elias'}, {firstName: 'Tommy', lastName: 'Maintz'}, {firstName: 'Ed', lastName: 'Spencer'}, {firstName: 'Jamie', lastName: 'Avins'}, {firstName: 'Aaron', lastName: 'Conran'}, {firstName: 'Dave', lastName: 'Kaneda'}, {firstName: 'Michael', lastName: 'Mullany'}, {firstName: 'Abraham', lastName: 'Elias'}, {firstName: 'Tommy', lastName: 'Maintz'}, {firstName: 'Ed', lastName: 'Spencer'}, {firstName: 'Jamie', lastName: 'Avins'}, {firstName: 'Aaron', lastName: 'Conran'}, {firstName: 'Dave', lastName: 'Kaneda'}, {firstName: 'Michael', lastName: 'Mullany'}, {firstName: 'Abraham', lastName: 'Elias'}, {firstName: 'Tommy', lastName: 'Maintz'}, {firstName: 'Ed', lastName: 'Spencer'}, {firstName: 'Jamie', lastName: 'Avins'}, {firstName: 'Aaron', lastName: 'Conran'}, {firstName: 'Dave', lastName: 'Kaneda'}, {firstName: 'Michael', lastName: 'Mullany'}, {firstName: 'Abraham', lastName: 'Elias'}, {firstName: 'Tommy', lastName: 'Maintz'}, {firstName: 'Ed', lastName: 'Spencer'}, {firstName: 'Jamie', lastName: 'Avins'}, {firstName: 'Aaron', lastName: 'Conran'}, {firstName: 'Dave', lastName: 'Kaneda'}, {firstName: 'Michael', lastName: 'Mullany'}, {firstName: 'Abraham', lastName: 'Elias'}, {firstName: 'Tommy', lastName: 'Maintz'}, {firstName: 'Ed', lastName: 'Spencer'}, {firstName: 'Jamie', lastName: 'Avins'}, {firstName: 'Aaron', lastName: 'Conran'}, {firstName: 'Dave', lastName: 'Kaneda'}, {firstName: 'Michael', lastName: 'Mullany'}, {firstName: 'Abraham', lastName: 'Elias'}, {firstName: 'Jay', lastName: 'Robinson'} ] }); Ext.create('Ext.Panel', { fullscreen: true, layout: 'fit', items: { xtype: 'dataview', id: 'dv2', store: myStore, itemTpl: '<div>{lastName}, {firstName}</div>' } });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.
-
13 Dec 2011 12:25 PM #3
-
18 Jan 2012 11:52 AM #4
DataViews in ST2 Developer previews
DataViews in ST2 Developer previews
Do DataViews work in any of the ST2 developer preview releases?
-
18 Jan 2012 11:59 AM #5Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,656
- Vote Rating
- 435
- Answers
- 3108
DataView has worked in in them... just the examples are updated (fixed for beta) and in PR1 if the store changed it wouldn't refresh (PR2 fixed that I think, if not PR3 did).
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.


Reply With Quote