PDA

View Full Version : How do I control the active state of Ext.TabPanel by URL?



soulgen
14 Dec 2010, 10:28 PM
Sorry no screenshot, but don't worry, this is easy to imagine.

Say I have a tabpanel with 3 tab: 'Tab 1', 'Tab 2', and 'Tab 3'.
And I access my app by URL: http//localhost/myapp/index.php

So, how do I control the tabpanel's tab (active state) by URL?
For example, when I point to http//localhost/myapp/index.php#tab2, then the 'Tab 2' will activated.

Thx before.

Graveworm
15 Dec 2010, 12:52 AM
Hi soulgen,

you have to get your given Param (?activeTab=tab2) in php and parse it to js.
Than u have to set the
activeTab : String/Number in your config of the tabPanel.

soulgen
15 Dec 2010, 2:09 AM
Ok, I will try

But does the tabpanel has native config to handle this?