Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4531954
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T13:58:06+00:00 2026-05-21T13:58:06+00:00

I’m using ExtJS 4 (beta 3) and I have a TreePanel that is my

  • 0

I’m using ExtJS 4 (beta 3) and I have a TreePanel that is my kind of navigation menu.
It is something like this:

  • Jobs
    • Add Job
    • List All Jobs
  • …
    • …
    • …

(this will be made on a permission system base, but that’s another story)

On ExtJS 3, do something when i clicked “Add Job” was as simple as adding

...
leaf:true,
listeners:{
click:function(n){
       //my code...
   }
}
...

to the root children elements.

Now It’s not that simple. The closer i got was with (on the treepanel)

listeners:{
    click : {
             element : 'el',
             fn : function(eve, elem, obj){
                   console.log(node);
                   console.log(elem);
                   console.log(obj);
                  }
    }
}

So, maybe i’m just a noob, maybe i have already a strong hatred for ExtJS, maybe is just a problem in this beta version, but…

How do I add a listener to the click event on the tree nodes? (the Select event won’t do what i need)

Thank you guys.

EDIT: Currently testing with this, and it’s not working.

 ... = Ext.create('Ext.tree.TreePanel', {
                        region      : 'west',
                        collapsible : false,
                        title       : 'ITMI',
                        width       : 220,
                        margins     : '5 5 5 5',
                        cmargins    : '5 5 5 5',
                        hideHeaders : true,
                        useArrows   : true,
                        rootVisible : false,
                        headers: [{
                                xtype    : 'treeheader',
                                text     : 'Nome',
                                flex     : 1,
                                dataIndex: 'nome'
                            }],
                        store: store,
                        listeners:{
                            itemclick: function(n){
                                console.info(n);
                            }
                        }
    ...

EDIT 2: The itemclick event now works (on EXJS 4 final), It still doesn’t solve my problem. I’d Like to call a specific function when i call each treenode. Before it was really easy. Now i can’t figure it out.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T13:58:06+00:00Added an answer on May 21, 2026 at 1:58 pm

    in ext4 beta3 (maybe in final release too)… there is no longer click event….
    this has changed to itemclick more info

    var tree = Ext.create('Ext.tree.Panel', {
        store: store,
        renderTo: Ext.getBody(),
        height: 300,
        width: 250,
        title: 'Files',
    
        listeners:{
            itemclick: function(n){
                console.info(n);
            }
        }
    
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
That's pretty much it. I'm using Nokogiri to scrape a web page what has
For some reason, after submitting a string like this Jack’s Spindle from a text
this is what i have right now Drawing an RSS feed into the php,
I've got a string that has curly quotes in it. I'd like to replace
I have a small JavaScript validation script that validates inputs based on Regex. I
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have a French site that I want to parse, but am running into
This could be a duplicate question, but I have no idea what search terms

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.