2
votes

With Sencha Touch version 1.1, I try to put several lists of type Ext.List in Ext.Carousel so that: 1. I can swipe horizontallyin order to switch between several different lists. 2. At the same time I want to be able to scroll through the visible list and be able to select a row, etc.

What works so far: I could add several lists to a carousel. Everything is rendered perfectly. The horizontal swipe gesture works so that I can switch between different lists.

The problem: I cannot scroll and select a row from my lists. It seems that the carousel steels away all events and my list does not react to any drag, scroll or click events.

Any idea?

 Ext.regModel('Contact', {
fields: ['firstName', 'lastName']});

var store = new Ext.data.JsonStore({
    model  : 'Contact',
    sorters: 'lastName',

    getGroupString : function(record) {
        return record.get('lastName')[0];
    },

    data: [
        {firstName: 'Tommy',   lastName: 'Maintz'},
        {firstName: 'Rob',     lastName: 'Dougan'},
        {firstName: 'Ed',      lastName: 'Spencer'},
        {firstName: 'Jamie',   lastName: 'Avins'}
    ]
});

var list1 = new Ext.List({
    fullscreen:true,
    itemTpl : '{firstName} {lastName}',
    grouped : true,
    indexBar: false,
    scroll: true,
    store: store
});


var list2 = new Ext.List({
    fullscreen:true,
    itemTpl : '{firstName} {lastName}',
    grouped : true,
    indexBar: false,
    scroll: true,
    store: store,
    listeners : {
                itemtap : function(view, index, item, e) {
                    alert("test for tab works");
                }
            }
});

  carousel = new Ext.Carousel({
      indicator:false,
       direction:'horizontal',
       fullscreen:true,
         items: [
             list1,
            list2
]
});

carousel.show();
list1.show();
list2.show();
1
I just copied and pasted your code into my project and it works fine.Titouan de Bailleul

1 Answers

0
votes

If you just didn't solve the problem,

try to use "scrollable: true," instead of "scroll"

or try to use scrollable inside the carousel.