[Q]: Howto get icon class from tree node (clientside)?

  1. #1

    [Q]: Howto get icon class from tree node (clientside)?


    I am messing around a little bit finetuning everything
    I have a minor problem as I'd like to have the same icon in the newly created tab as I have in the treenode the user clicked (to create/activate the tab)

    Something like this:
    treenode | tabpanel
    A        | AA |
        AA   |-----------------------
        AB   |
    Howto get icon from AA node to AA tab?

    Clientside javascript to create tabs called from the TreePanel.Listeners.Click.Handler:

    <script type="text/javascript">
    var loadPage = function(tabPanel, node) {
        var tab = tabPanel.getItem(node.id);
        if (!tab) {
            tab = tabPanel.add({
                id: node.id,
                title: node.text,
                closable: true, 
                iconCls: 'icon-table',
                autoLoad: {
                    showMask: true,
                    url: node.attributes.href,
                    mode: 'iframe',
                    maskMsg: 'Indl&amp;aelig;ser ' + node.text + '...'
  2. #2

    RE: [Q]: Howto get icon class from tree node (clientside)?


    try to get node icon and set it to tab iconCls


    Vladimir Shcheglov
    Sr. Developer
  3. #3

    RE: [Q]: Howto get icon class from tree node (clientside)?

    Ahh excellent, works like a charm :)

    Anywhere I can found doucmentation to get an overview of the clientside/javascript classes?
    I tried to run the clientside debugger to find the correct property but didn't have much luck

    I have access to the ExtJS 2.2 API documentation but I have no explanation on the attributes object

    Thanks in advance

Similar Threads

  1. Replies: 0
    Last Post: Dec 19, 2011, 1:11 AM
  2. Replies: 16
    Last Post: Jul 19, 2011, 4:53 AM
  3. add node to tree panel
    By a_elsayed2010 in forum 1.x Help
    Replies: 0
    Last Post: Oct 17, 2010, 3:35 PM
  4. [CLOSED] [1.0]Tree Node Text class change issue
    By danielg in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Jul 06, 2010, 3:46 PM
  5. Tree Node leaf
    By Richardt in forum 1.x Help
    Replies: 3
    Last Post: Sep 24, 2009, 12:06 PM

Posting Permissions