im creating an app with Sencha Touch 2 right now and got a strange behaviour. I've created a tab.panel to hold different detail-views. One of this views is a list.
At the moment there are only two panels inside my tab.panel. When i declare the list as the first object and the html-tab as the second, everything works fine. But when i define the list as the second element, it will overlay the other tab so it will not be visible at all.
What is this behaviour and how can i avoid it?
Here's my code:
The tab.panel-Container:
Ext.define('my.view.DetailsContainer', {
extend: 'Ext.tab.Panel',
xtype: 'DetailsContainer',
alias: 'DetailsContainer',
id: 'DetailsContainer',
config: {
tabBarPosition: 'bottom',
defaults: {
styleHtmlContent: true
},
activeItem: 0,
items: [
{
xtype: 'ListView'
},
{
xtype: 'DetailsInfo'
}
]
},
updateData: function() {
this.callParent(arguments);
this.query('#DetailsInfo')[0].setData(this.getData());
this.fireEvent('loadInfos', '', this.getData().object);
}
});
The list-view:
Ext.define('my.view.ListView', {
extend: 'Ext.Panel',
xtype: 'ListView',
alias: 'ListView',
requires: [
'Ext.dataview.List'
],
config: {
title: 'Services',
iconCls: 'more',
layout: 'fit',
items: {
xtype: 'list',
store: 'services',
//Bei Klick auf ItemDisclosurebutton zeige nähere Informationen zum Service
onItemDisclosure: function(store, item) {
var service = item.getRecord().serviceid;
console.log(service);
},
itemTpl: '<div><span> </span>' +
' {label}' +
'</div>'
}
}
});
The html-view:
Ext.define('my.view.DetailsInfo', {
extend: 'Ext.Panel',
xtype: 'DetailsInfo',
alias: 'DetailsInfo',
id: 'DetailsInfo',
config: {
scrollable: 'vertical',
layout: 'fit',
iconCls: 'info',
title: 'Info',
html: '<p>My data</p>'
}
});