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

      0  

    Default prepareData not working in List?

    prepareData not working in List?


    Both variables show up blank in the template. In regular Ext JS 4, this works perfectly. Is there a new way to do this in Touch 2 or is this a bug?

    Code:
    {    xtype: 'list',
        store: 'SomeStore',
        itemTpl: [
            '<div>{shortTitle}</div>',        '<div>{sometest}</div>'
        ],
        prepareData: function(data) {
            Ext.apply(data, {
                shortTitle: Ext.util.Format.ellipsis(data.name, 7),            sometest: 'Test'
            });
            return data;
        }
    }

  2. #2
    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


    This is a bug. I've added it to our bug tracker.
    Sencha Inc.
    Robert Dougan - @rdougan
    Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.

  3. #3
    Sencha User Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661
    Vote Rating
    20
    Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough

      0  

    Default


    This has been fixed for the next release.

    Sencha Inc

    Jamie Avins

    @jamieavins

  4. #4
    Sencha User chuckoh's Avatar
    Join Date
    Jan 2012
    Location
    Seoul, Korea
    Posts
    16
    Vote Rating
    0
    chuckoh is on a distinguished road

      0  

    Default just wondering...

    just wondering...


    when do you think you guys'll release the prepareData bug fixed version? any rough ideas?

  5. #5
    Sencha User Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661
    Vote Rating
    20
    Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough

      0  

    Default


    I can't give any dates as of yet, should be soon though.

    Sencha Inc

    Jamie Avins

    @jamieavins

  6. #6
    Sencha Premium Member
    Join Date
    Dec 2011
    Posts
    27
    Vote Rating
    1
    neilios is on a distinguished road

      0  

    Default Is this really fixed?

    Is this really fixed?


    I'm using version 2.0.1.1 and am running into this problem using an Ext.dataview.List instance, where prepareData is not being called at all.

    Is the fix in some other version or have I found something else?

    Code:
    var cfg = {
        extend:'Ext.dataview.List';
        config: {
           store: myStore;
            itemTpl: [
                  '<tpl for=".">',
                      '<div class="requests-wrap x-data-item" id="request-{ID}">',
                          '{title}',
                          '<span>{summary}</span>',
                          '<span>{subject}</span>',
                      '</div>',
                  '</tpl>',
                  '<div class="x-clear"></div>'
            ].join(''),
    
            prepareData: function(data, recordIndex, record) {
                // Never called
                Ext.apply(data, {
                    title: "My Title,
                    summary: "My Summary"
                });
                return data;
            },        
        }
    }
    Ext.define('myName', cfg);

    Thanks,
    Neil

  7. #7
    Sencha Premium Member
    Join Date
    Dec 2011
    Posts
    27
    Vote Rating
    1
    neilios is on a distinguished road

      0  

    Default


    Did anyone that had this problem earlier get a fix in a later release?
    Is there a workaround?

    Thanks,
    Neil

  8. #8
    Sencha User
    Join Date
    Mar 2008
    Posts
    66
    Vote Rating
    0
    Ballsacian1 is on a distinguished road

      0  

    Default Broken in RC1

    Broken in RC1


    RC1 doesn't use the data from prepareData to actually populate the itemTpl. prepareData gets called by the DataItem class but then the ListItem call ListItem.getBody().setRecord(record) which is what results in rendering of the itemTpl the ListItem.getBody() does not have the prepareData but only a getData(true).

  9. #9
    Sencha User
    Join Date
    Mar 2007
    Location
    Haarlem, Netherlands
    Posts
    1,243
    Vote Rating
    10
    TommyMaintz will become famous soon enough TommyMaintz will become famous soon enough

      0  

    Default


    This has been fixed for the next release. Thanks for the report.

  10. #10
    Sencha User
    Join Date
    May 2007
    Posts
    24
    Vote Rating
    1
    gigel is on a distinguished road

      1  

    Default


    And which release is that? You posted in October 2012. This is March 2013, using Sencha Touch 2.1.1 and the function still does not get called.

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