sencha touch2 は初めてです。表示したいリストの下にいくつかのテキストラベルを表示したい。そのため、いくつかのラベルを定義し、Twitter サービスにアクセスすると、データのリストが表示されます。以下は私のコードです。
- このコードで、extend: 'Ext.form.Panel' にコメントすると、extend: 'Ext.navigation.View' を使用すると、リスト データは表示されますが、定義されたラベルは表示されません。
- extend: 'Ext.navigation.View' にコメントすると、extend: 'Ext.form.Panel' を使用した場合、リスト データは表示されませんが、定義されたラベルは表示されます。
私のコードで何が問題なのか教えてください:
コード:
Ext.define("E:\SenchaTouch.view.Main", {
extend: 'Ext.form.Panel',
//extend: 'Ext.navigation.View',
xtype: 'companyprofilepage',
id: 'companyprofile',
config: {
items: [
{
xtype: 'toolbar',
docked: 'top',
title: 'My Toolbar'
},
{
xtype: 'titlebar',
title: 'Title name'
},
{
margin: '10',
xtype: 'label',
html: 'Info1'
},
{
margin: '10',
xtype: 'label',
html: 'A company is a business organization. It is an association or collection of individual real '
},
{
xtype: 'list',
itemTpl: '{title}',
store: {
autoLoad: true,
fields: ['from_user', 'text', 'profile_image_url'],
proxy: {
type: 'jsonp',
url: 'http://search.twitter.com/search.json?q=Sencha Touch',
reader: {
type: 'json',
root: 'results'
}
}
},
itemTpl: '<img src="{profile_image_url}" /><h2>{from_user}</h2><p>{text}</p>'
}]
}
});