1. #1
    Sencha User
    Join Date
    Apr 2012
    Posts
    74
    Vote Rating
    2
    url is on a distinguished road

      0  

    Default Unanswered: How to fire an click event for an xtemplate

    Unanswered: How to fire an click event for an xtemplate


    Hi All,

    There is tpl tag for a container where the html is getting prepared. I want to fire an click event for the template .How can i achieve this?


    Code Snippet:


    {
    xtype:'container',
    cls:'post-body-cont',
    // id : me.getId()+'-header',
    data:{'message':me.msg,'lastmoddate':me.lastmodifi ed,splitbuttonhtml:me.splitButtonHtml },
    tpl:new Ext.XTemplate(' <div id = '+me.getId()+'-header onClick = '+this.something()+'><span style="margin- left:20px;"> {message}</span>' +
    '<div style="float:right;" >{splitbuttonhtml}</div>'+
    '<img border="0" data-qtip=" collapse" data-qclass="seek-qtip"'+
    ' src="data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" '+
    'class="x-wtc-link-btn expanding" style="float:right;">' +
    '<img border="0" data-qtip="REPLY" data-qclass="seek-qtip" '+'src="data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" '+
    ' class="x-wtc-link-btn reply" style="float:right;" >'+
    '<label class="x-component x-component-default" style="float:right;margin-right:8px;border-width:0;"> {lastmoddate}</label> </div>'
    ,{ compiled:true,
    getcontextMenu:function(){
    return '<span>getContextMenu</span>';
    }

    })




    }


    Any help is highly appreciated.

  2. #2
    Touch Premium Member suzuki1100nz's Avatar
    Join Date
    Apr 2011
    Location
    New Zealand
    Posts
    447
    Answers
    21
    Vote Rating
    62
    suzuki1100nz is a jewel in the rough suzuki1100nz is a jewel in the rough suzuki1100nz is a jewel in the rough suzuki1100nz is a jewel in the rough

      0  

    Default


    declare an onRender function and in it access the XTemplate div by a dom query attach a click listener to the found element.

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