1. #1
    Sencha User
    Join Date
    May 2013
    Posts
    22
    Vote Rating
    0
    abram.darnutzer is on a distinguished road

      0  

    Default Unanswered: XTemplate not rendering more than once - ExtJS

    Unanswered: XTemplate not rendering more than once - ExtJS


    I have a View that is using XTemplate.

    extend: 'Ext.view.View', xtype: 'idView', width: 300, itemSelector: 'aside.x-item', loadMask: false, overflowY: 'auto', itemTpl: new Ext.XTemplate( '<tpl for=".">', '<p>{id}</p>', '</tpl>', ),I'm referencing the object in 2 panels. This panel is shown first and it displays the Xtemplate just fine.

    { xtype: 'idView', itemId: 'first-idview', store: 'IDStore', }But on the second panel that I try to use it, nothing shows up. The ExtJS code for it is exactly the same as above. Is there something that I'm missing here?

  2. #2
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    4,895
    Answers
    368
    Vote Rating
    176
    slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold

      0  

    Default


    The following seems to work ok for me. Am I missing something in the test case?
    *Don't forget to wrap your code in code blocks for readability

    Code:
    Ext.define('MyView', {
        extend: 'Ext.view.View',
        xtype: 'idView',
        width: 300,
        itemSelector: 'aside.x-item',
        loadMask: false,
        overflowY: 'auto',
        itemTpl: new Ext.XTemplate('<tpl for=".">', '<p>{id}</p>', '</tpl>')
    });
    
    
    Ext.create('MyView', {
        renderTo: document.body,
        height: 100, width: 100,
        store: {
            fields: ['id'],
            data: [{
                id: 1
            }, {
                id: 2
            }]
        }
    });
    
    
    Ext.create('MyView', {
        renderTo: document.body,
        height: 100, width: 100,
        store: {
            fields: ['id'],
            data: [{
                id: 1
            }, {
                id: 2
            }]
        }
    });
    Are you a Sencha products veteran who has wondered what it might be like to work at Sencha? If so, please reach out to our recruiting manager: sheryl@sencha.com

    C
    heck out all of the 2013 SenchaCon presentations here:
    http://www.sencha.com/blog/senchacon...now-available/

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