aecontrerasl
29 Nov 2010, 2:09 PM
Hi dudes.
Im updating my Sencha version from 0.96 to 1.0.
I Just replace my extjs-touch-debug.js with sencha-touch-debug.js.
I made some changes to my code to be updated to 1.0 like, "tpl" to "itemTpl".
But im getting "DataView requires tpl, store and itemSelector configurations to be defined."
// Timeline
var timeline = new Ext.List({
id:'c',
title: 'c',
//loadingText: 'Loading...',
itemSelector: 'div',
scroll: 'vertical',
height: '358',
itemTpl: [
'<tpl for=".">',
'<div id="{name}" class="{[xindex % 2 === 0 ? "area_content" : "area_content2"]}">',
'<h2>{name}</h2>',
'</div>',
'</tpl>'
],
singleSelect: true,
store: store
});
This is a portion of my whole code, thats how im using Lists and when some user click at some tab I get the content from a webservice.
function LoadContent(){
Ext.util.JSONP.request({
url: 'http://website.com/web_service.php',
callbackKey: 'callback',
params: {
callback: 'callback'
},
callback: function(data) {
data = data.areas;
//console.log(data.areas);
// Update...
timeline.store.loadData(data, false);
}
})
};
Im not using DataViews as it, just Lists and all of them have tpl, store and itemSelector defined.
Can you give me a hand please.
Thanks in advance.
Im updating my Sencha version from 0.96 to 1.0.
I Just replace my extjs-touch-debug.js with sencha-touch-debug.js.
I made some changes to my code to be updated to 1.0 like, "tpl" to "itemTpl".
But im getting "DataView requires tpl, store and itemSelector configurations to be defined."
// Timeline
var timeline = new Ext.List({
id:'c',
title: 'c',
//loadingText: 'Loading...',
itemSelector: 'div',
scroll: 'vertical',
height: '358',
itemTpl: [
'<tpl for=".">',
'<div id="{name}" class="{[xindex % 2 === 0 ? "area_content" : "area_content2"]}">',
'<h2>{name}</h2>',
'</div>',
'</tpl>'
],
singleSelect: true,
store: store
});
This is a portion of my whole code, thats how im using Lists and when some user click at some tab I get the content from a webservice.
function LoadContent(){
Ext.util.JSONP.request({
url: 'http://website.com/web_service.php',
callbackKey: 'callback',
params: {
callback: 'callback'
},
callback: function(data) {
data = data.areas;
//console.log(data.areas);
// Update...
timeline.store.loadData(data, false);
}
})
};
Im not using DataViews as it, just Lists and all of them have tpl, store and itemSelector defined.
Can you give me a hand please.
Thanks in advance.