Hi all
I'm new to Sencha touch, I used to use Jquery mobile but now I want to use sencha touch2. So far I'm loving it!
Now I'm stuck with something probably basic, showing a list. I was following the getting started video and it showed how to display a list of blogposts.
First I had something like:
Code:
Ext.define('GS.view.Blog', {
extend: 'Ext.navigation.View',
xtype: 'blog',
config: {
title: 'Blog',
iconCls: 'star',
items: {
xtype: 'list',
itemTpl: '{title}',
store: {
autoload: true,
fields: ['title', 'author', 'content'],
proxy: {
type: 'jsonp',
url: 'https://ajax.googleapis.com/ajax/services/feed/load?v=1.0&q=http://feeds.feedburner.com/SenchaBlog',
reader: {
type: 'json',
rootProperty: 'responseData.feed.entries'
}
}
}
}
}
});
This was the code from the video and does not show any data. When I changed it to:
Code:
Ext.define('GS.view.Blog', {
extend: 'Ext.navigation.View',
xtype: 'blog',
config: {
title: 'Blog',
iconCls: 'star',
items: {
xtype: 'nestedlist',
title: 'Blog',
iconCls: 'star',
displayField: 'title',
store: {
type: 'tree',
fields: [
'title', 'link', 'author', 'contentSnippet', 'content',
{name: 'leaf', defaultValue: true}
],
root: {
leaf: false
},
proxy: {
type: 'jsonp',
url: 'https://ajax.googleapis.com/ajax/services/feed/load?v=1.0&q=http://feeds.feedburner.com/SenchaBlog',
reader: {
type: 'json',
rootProperty: 'responseData.feed.entries'
}
}
}
}
}
});
But then I get a nestedlist and it shows 2 blue title bars instead of 2. How do I properly use the 'list' instead of 'nestedlist'. Or should I just hide the secondblue bar?