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

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