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
    434
    Answers
    21
    Vote Rating
    37
    suzuki1100nz has a spectacular aura about suzuki1100nz has a spectacular aura about suzuki1100nz has a spectacular aura about

      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

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar