PDA

View Full Version : CardLayout combined with List/OnItemDisclosure



macap
30 Jan 2011, 7:07 AM
Hello,

I want to implement various List-Panels in a Card layout.
When I click at a list item I want to jump to the next panel in my cardlayout.

My current code looks like this:




demos.List = new Ext.Panel(
{
fullscreen : true,
// layout:'fit',
// items:[{
id: 'baseLayout',
layout : 'card',
items : [
{
width : Ext.is.Phone ? undefined : 300,
height : Ext.is.Phone ? undefined : 500,
xtype : 'list',
disableSelection: true,
scroll : 'vertical',
onItemDisclosure : function(record, btn, index) {
Ext.get('baseLayout').setActiveItem(1, {type: 'slide', cover: 'true', direction: 'left'});
Ext.Msg.alert('Informationen', 'Mehr über '
+ record.get('STANDORT_BEZEICHNUNG'),
Ext.emptyFn);
},
store : demos.ListStore,
itemTpl : '<strong><b>{STANDORT_CODE}</b></strong><br /> {STANDORT_BEZEICHNUNG}'
}, {
html : 'b'
} ]
});


But it´s not working and I do not have any idea what´s going wrong.

The demos.List is taken from the KitchenSink sample application.


Any ideas?


Thanks,

Maritn