Threaded View

  1. #1
    Sencha User
    Join Date
    Dec 2011
    Vote Rating
    jmartinez40 is on a distinguished road


    Default Answered: ComboBox custom template - how do I attach a click handler

    Answered: ComboBox custom template - how do I attach a click handler

    I have constructed a ComboBox with a custom Template. Inside this template I have anchor links for which I need to handle the 'click' event. I don't know if this is the best way to implement such functionality, so if there is a better way I am all ears.
    Last edited by jmartinez40; 2 Dec 2011 at 9:12 AM. Reason: Code was missing

  2. You should be able to specify listeners in the listConfig of the combobox. They will then apply to the drop-down.

    I think you've misunderstood Mitchell's example. He's using event delegation. That involves attaching a single listener to the whole list. The delegate setting then ensures that your listener only fires when a suitable element is clicked. Using this technique there's no need to bind to each row in the list, in fact it will even cope when the contents of the list changes.

    I haven't tried it but you could probably do something like this...

    Ext.create('Ext.form.field.ComboBox', {
        listConfig: {
            listeners: {
                el: {
                    click: {
                        delegate: 'a.iol-combo-list-item-action',
                        fn: function(ev, anchor) {
    Check out the docs for these settings for more info.

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