Success! Looks like we've fixed this one. According to our records the fix was applied for TOUCH-1203 in a recent build.
  1. #1
    Sencha User
    Join Date
    Nov 2011
    Posts
    20
    Vote Rating
    0
    John2011 is on a distinguished road

      0  

    Question Ext.List shows emptyText immediatly irregardless of deferEmptyText

    Ext.List shows emptyText immediatly irregardless of deferEmptyText


    I have an ext.List and want to show a text when there are no items in it. According to the documentation I can use the emptyText config for that. However, I want this text to be only shown after loading data from the attached store. This should happen automatically because deferEmptyText is true by default.

    However, the text is shown immediately. Is this a bug, is or is there something I am overlooking?

    Code:
    var list = Ext.create('Ext.List', {
                    id: 'locationList',
                    emptyText: 'No items found.',
                    deferEmptyText: true,
                    store: myStore
    });
    I am now going to try a workaround where the emptyText is set after the datachanged event, but it would be nice to know what exactly is going on here.

    I am using Sencha Touch 2.0.0 PR2.
    Relevant API Documentation: http://docs.sencha.com/touch/2-0/#!/....dataview.List

  2. #2
    Sencha User
    Join Date
    Nov 2011
    Posts
    20
    Vote Rating
    0
    John2011 is on a distinguished road

      0  

    Exclamation emptyText element remains in DOM

    emptyText element remains in DOM


    While working on my workaround I discovered another weird behavior.

    The emptyText is placed inside an element with the class x-innerhtml. It is placed there the first time an emptyText is set. However, once the list is filled with items this element remains in the DOM. If there are any styles attached to it it will be visible on top of the list.

    The workaround for this is to place another element inside the emptyText and apply the styling there.

    This is the code that works:
    HTML Code:
    myStore = Ext.create('Ext.data.JsonStore', {
         model: 'myModel',
         storeId: 'myStore',
         listeners: {
            datachanged: function() {
            
                myList.setEmptyText('<div id="noItemsMessage">No items found.</div>');
            }
    });

  3. #3
    Sencha - Sencha Touch Dev Team rdougan's Avatar
    Join Date
    Oct 2008
    Posts
    1,158
    Vote Rating
    6
    rdougan will become famous soon enough

      0  

    Default


    Thanks for the report. We shall look into it.
    Sencha Inc.
    Robert Dougan - @rdougan
    Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.

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