PDA

View Full Version : How to inject historyUrl on tab change in TabPanel



senchauser2010
1 Dec 2010, 12:19 PM
I am trying to use the MVC pattern. I am using Ext.dispatch to specify historyUrl on user actions and this is working fine.

However, what's the recommended way to inject historyUrl on events like tab change which happen automatically? I would like to track tab changes using history url so that back button/deep link works as exepcted.

Any suggestions welcome!

jeffremer
1 Dec 2010, 1:45 PM
You can listen to the 'change' event on the TabPanel's tabBar and then use Ext.History.add(yourtoken).

siebmanb
28 Nov 2011, 5:23 AM
You can also listen to the 'cardswitch' event of the TabPanel.