Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

  1. #1
    Sencha User
    Join Date
    Mar 2012
    Posts
    3
    Vote Rating
    0
    lpe2012 is on a distinguished road

      0  

    Default Unanswered: Reference component in controller

    Unanswered: Reference component in controller


    Hi,

    I have the component below in a panel. I need to reference this in teh controller so I can catch
    the event when a user clicks in this link. Any suggestions wil be appreciated.

    {
    /*
    * Insert a link
    *
    */
    xtype: 'container',
    layout: {type: 'hbox'},
    margin: '10 0 0 40',
    cls: 'auto-test-Cua-Report-Link',
    items: [
    {
    xtype: 'box',
    html: '> '
    },
    {
    xtype: 'box',
    autoRender: true,
    autoEl:
    {
    tag: 'a',
    href: 'CuaReport: CuaReport',
    title: Irm.imc.language.translate('tooltips.message.cuareport'),
    onclick: 'return false;',
    html: Irm.imc.language.translate('manageusers.buttons.cuareport')
    }
    }
    ]
    }

  2. #2
    Sencha - Community Support Team
    Join Date
    Jan 2012
    Posts
    1,376
    Answers
    346
    Vote Rating
    113
    vietits is a name known to all vietits is a name known to all vietits is a name known to all vietits is a name known to all vietits is a name known to all vietits is a name known to all

      0  

    Default


    Try this:
    Code:
            ....
            items: [{
                /*
                * Insert a link
                *
                */
                xtype: 'container',
                layout: {type: 'hbox'},
                margin: '10 0 0 40',
                cls: 'auto-test-Cua-Report-Link',
                items: [{
                    xtype: 'box', 
                    html: '> '
                },{
                    xtype: 'box', 
                    autoRender: true,
                    autoEl: {
                        tag: 'a', 
                        href: 'CuaReport: CuaReport', 
                        title: Irm.imc.language.translate('tooltips.message.cuareport'), 
                        onclick: 'return false;', 
                        html: Irm.imc.language.translate('manageusers.buttons.cuareport')
                    },
                    listeners: {
                        click: {
                            element: 'el',
                            fn: function(){
                                var cmp = Ext.getCmp(this.id);
                                cmp.up('container').fireEvent('click');
                            }
                        }
                    }
                }]
            },{
                 ....
            }]
            ....
    Suppose that component above is inside a panel, then you can refer to this component from controller as below:
    Code:
        this.control({
            'panel container': {
                click: function(){
                   console.log('link clicked');
                }
            }
        });

Thread Participants: 1