Threaded View

  1. #1
    Sencha User
    Join Date
    Oct 2011
    Location
    Germany
    Posts
    10
    Vote Rating
    0
    espi is on a distinguished road

      0  

    Default Answered: adding an Ext.list to an Ext.TabPanel: items in list not selectable

    Answered: adding an Ext.list to an Ext.TabPanel: items in list not selectable


    Hi,
    I'm using Sencha Touch 2.0.pr2

    I found nothing in Your sencha 2.x forum so I'm asking. I already reduced my problem to the following:
    • I created an Ext.TabPanel
    • I created an Ext.data.Store
    • inside the Ext.TabPanel I defined an item as a list with xtype:'list', everything is working fine
    • I created an Ext.List outside the Ext.TabPanel with Ext.create (or new Ext.List) using the same parameters and the result is, that the list-items ar not selectable.
    Can somebody help me?

    Thank You very much,
    Frederic

    Here is my code (the entire file):
    espi1.jpg

    Ext.application({
    name: 'MonsterApp',

    launch: function() {

    Ext.create('Ext.TabPanel', {
    fullscreen: true,
    items: [ test1,
    test2,
    { xtype: 'list',
    title: 'Test3 works',
    itemTpl: "{title}",
    store: listdata
    }
    ]
    });
    }
    });

    // listdata
    var listdata = Ext.create('Ext.data.Store', {
    fields: ['title'],
    data: [ {title: 'Alpha'}, {title: 'Bravo'}, {title: 'Charly'} ]
    });

    // List definition Test1
    var test1 = Ext.create('Ext.List',{
    title: 'Test1',
    itemTpl: '{title}',
    store: listdata
    });


    // List definition Test1
    var test2 = new Ext.List({
    title: 'Test2',
    itemTpl: '{title}',
    store: listdata
    });
    Last edited by espi; 12 Nov 2011 at 7:50 AM. Reason: here ist the code as a file

  2. You shouldn't create things outside your application. This works for me just by moving your list and store within the launch method:

    Code:
    Ext.application({
        name: 'myApp',
        launch: function() {
            var listdata = Ext.create('Ext.data.Store', {
               fields : ['title'],
               data   : [ {title: 'Alpha'}, {title: 'Bravo'}, {title: 'Charly'} ]
            });
    
    
            var test1 = Ext.create('Ext.List', {
               title: 'Test1',
               itemTpl: '{title}',
               store: listdata
            });
    
            Ext.create('Ext.tab.Panel', {
       			fullscreen : true,
       			items      : [test1]
    		});
    
    
        }
    });

Thread Participants: 1

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi