1. #1
    Ext User
    Join Date
    Jan 2008
    Posts
    124
    Vote Rating
    0
    tkm is on a distinguished road

      0  

    Default tree node selection

    tree node selection


    Hello Mates,
    I have a tree panel. My goal is to get the node text on mouse click. I am using the following code:
    Code:
    var node=tree.getSelectionModel().getSelectedNode();
    alert(node);
    2 issues.
    1. When I click on any node, it gives me the id of the previously selected node. I am not getting the name of the current clicked node, as I am invoking the code through listener on click event. I think at the point when I click on a node the previously clicked node still remains selected and before the selection changes to the newly clicked node, it takes the ID of the previous node and gives it to me. Any suggestions or way out would be a great help. Thank you.

  2. #2
    Ext User
    Join Date
    Jul 2007
    Location
    Washington, DC
    Posts
    190
    Vote Rating
    0
    esoteric is on a distinguished road

      0  

    Default


    Use Firefox with Firebug and start using the console.log feature instead of alert, it allows you to inspect anything passed even an object and its contents! Is extremely useful.

    Try node.text, thats just off the top of my head though.

  3. #3
    Ext User
    Join Date
    Jan 2008
    Posts
    124
    Vote Rating
    0
    tkm is on a distinguished road

      0  

    Default


    Quote Originally Posted by esoteric View Post
    Use Firefox with Firebug and start using the console.log feature instead of alert, it allows you to inspect anything passed even an object and its contents! Is extremely useful.

    Try node.text, thats just off the top of my head though.
    Thank you. I do most of the time use Firbug to debug stuff. But sometimes can't get rid of the old habit. However in this case, node.text purely did the work for me. Thank you sir. Continuing to that issue, have u experienced click event and selection event pointing 2 different node?
    Thank you again as my required issue is solved.

  4. #4
    Ext User
    Join Date
    Jul 2007
    Location
    Washington, DC
    Posts
    190
    Vote Rating
    0
    esoteric is on a distinguished road

      0  

    Default


    Do a console.log on the variable node, whats its contents?

    Lets also see the rest of your tree code wrapped in bbcode code brackets on the forum please. Thanks.

  5. #5
    Sencha User
    Join Date
    Oct 2010
    Posts
    27
    Vote Rating
    0
    shahab_et is on a distinguished road

      0  

    Default


    this might help you :
    Code:
    YourTree.tree.selModel.selNode.text;

Thread Participants: 2

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