1. #1
    Sencha User sb32's Avatar
    Join Date
    Sep 2007
    Posts
    66
    Vote Rating
    0
    sb32 is on a distinguished road

      0  

    Default [SOLVED] on 'click' for leaf tree node?

    [SOLVED] on 'click' for leaf tree node?


    I can't find anywhere that shows how to execute a function upon selection of a tree node.

    should be simple right?

    It's a tree panel with the followign root:
    PHP Code:
    root: new Ext.tree.AsyncTreeNode({
        
    text:'Trunk',
        
    expanded:true,
        
    children:[
            {
                
    text:'PleaseWork',
                
    id:'1',
                
    leaf:true,
                
    on:{
                    
    click: function () {doSomething();}
                }
            }
            ]
    }) 
    Do I have to setup an Observable? Not familiar with that really.. Surely there's a builtin for selection of a node.. thanks for the hlep

  2. #2
    Ext User
    Join Date
    Aug 2007
    Posts
    3
    Vote Rating
    0
    zergemedve is on a distinguished road

      0  

    Default


    Hi,

    Try this:
    Code:
    root: new Ext.tree.AsyncTreeNode({ 
        text:'Trunk', 
        expanded:true, 
        children:[ 
            { 
                text:'PleaseWork', 
                id:'1', 
                leaf:true, 
                listeners: {
                    click: function() {alert('123')}
                }
            } 
            ] 
    })

  3. #3
    Sencha User sb32's Avatar
    Join Date
    Sep 2007
    Posts
    66
    Vote Rating
    0
    sb32 is on a distinguished road

      0  

    Default


    Worked like a champ. Thanks!!

Thread Participants: 1

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