PDA

View Full Version : CardLayout combined with List/OnItemDisclosure



macap
31 Jan 2011, 12:30 AM
Hello,

I am using PhonegGap and SenchaTouch and want to implement 4 lists in a Card-Layout.
My sample code (based on the KitchenSink sample) 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'});

},
store : demos.ListStore,
itemTpl : '<strong><b>{STANDORT_CODE}</b></strong><br /> {STANDORT_BEZEICHNUNG}'
}, {
html : 'b'
} ]
});


I tried



Ext.get('baseLayout').setActiveItem(1, {type: 'slide', cover: 'true', direction: 'left'});


and


this.setActiveItem(1, {type: 'slide', cover: 'true', direction: 'left'});


But without any result.
What do I do wrong?



Regards,

Martin

macap
31 Jan 2011, 1:21 AM
By the way.

I am using SenchaTouch 1.01a and Phonegap 0.9.3.

macap
31 Jan 2011, 5:12 AM
I solved my problem.

DonĀ“t know why but it seems that:



{
html : 'b'
}


Is not enough for a panel definition to use in a Card Layout

sansie
28 Apr 2011, 6:41 AM
I having the same kind of problems, so I'm interested in what code you wrote in item 1 instead of html:'b'

Thanks in advance.

macap
28 Apr 2011, 10:58 PM
Hi,

I used another panel instead of "normal" Html.


Regards,

Martin

sansie
29 Apr 2011, 12:45 AM
Thank you. :)