Remember active tab
Is a easy way to remenber active tab?
In this thread jack said that was implement in next release: http://extjs.com/forum/showthread.php?t=227&highlight=tab+cookie
Any ideas?
getState should return information about what to store in the Provider.
applyState should tell the component how to restore that state given the information.
stateEvents dictate when state will be stored. Which events trigger storing state.
I have a tab panel that loads on a page with no default active panel set.
I have tried adding Ext.state.Manager.setProvider(new Ext.state.CookieProvider()); to the top of my application and then adding stateEvents: ['activate'] to my tabpanel, but it doesn't appear to be creating any cookies when I activate a tab and when I refresh the page it goes back to the default of none active.
Ext.state.Manager.setProvider(new Ext.state.CookieProvider());
var mypanel = new Ext.Panel({
layout: 'border',
applyTo: 'body-div',
height: 800,
footer: true,
autoShow: true,
items:[{
xtype: 'tabpanel',
stateEvents: ['tabchange'],
split: true,
region: 'center',
id: 'object_panel',
activeTab: Ext.state.Manager.get('active_tab', 0),
listeners: {
'tabchange': function(){
Ext.state.Manager.set('active_tab', Ext.getCmp('object_panel').getActiveTab().getId()) ;
}
},
items:[ ... ]
#If you have any other info about this subject , Please add it free.# |

