1
votes

I'm handling pretty much interesting and complex tasks in Extjs. I'm facing issues with treepanel and tabpanel expanding. I've a Tabpanel in Viewport table layout.And My tabpanel contains tabs like Tab1,Tab2,tab3 etc.. In this some tabs have different treemenus in the left side. For example Tab2 may have treepanel nodes like Node A, Node B,etc.. in Tab3 and Tab4 I have some links which are pointed to some Node B in Tab2 or it may pointed to childrens of Node B.For best understating my layout please check the bellow image.

tab2 with treepanel

So When I click on the link then Tab2 should activate and the left side treepanel should expand upto the particular node/child node level. I've done this In Extjs2 with lots of hardwork. Now i'm migrating to Extjs4 but it's not working.

For better understanding this issue i"m adding tab3 screen short also. Please look in to screenshot.

enter image description here

When clicked on Category:: Node link then "Tab2" should activate and left side tree menu should expand upto Node A. Where as when click on Sub-Category:: Node A - Child A link then "Tab2" should activate and left side tree menu should expand upto Node A --- > Child A and also Child A Should be selected.

Would be happy if you people suggest me any help.

Can any one have grate ideas?

1

1 Answers

0
votes

Just think it this way: You can assign id to a Extjs Component and get it back with Ext.getCmp('component_id'). So steps are:

  • First attach 'click' event handler to the hyperlink.
  • Assign id for the tabpanel: this is to change the selected tab with
    Ext.getCmp('tabpanel_id').setActiveTab(tab_index).
    
  • Assign id for the left panel of each tab: this is to get the root of the tree with
    Ext.getCmp('left_panel_id').store.getRootNode(). 
    
    Then you can jump to the selected node using:
    root_Node.findChild('attribute_name', 'value_match')
    
    or
    root_Node.getChildAt(index)
    

Here you can parse the parameters in the hyperlink then use them as inputs as above.