Ext.state.Manager.setProvider(new Ext.state.CookieProvider());
/*This is the global state manager. By default all components that are "state aware" check this class for state information if you don't pass them a custom state provider. In order for this class to be useful, it must be initialized with a provider when your application initializes.这是Ext官方对state.Manager的解释,意思大概是说
初始化Ext状态管理器,在Cookie中记录用户的操作状态,如果不启用,象刷新时就不会保存当前的状态,而是重新加载
象如果窗口中 有用可拖动面板的话,你在拖动后如果启动了Ext.state.Manager.setProvider(new Ext.state.CookieProvider()),就算刷新后面板仍然会在你拖动后的位置。如果不启用的话是不是就会按照默认的排列方式排列
- Ext.state.Manager.setProvider(
- new Ext.state.CookieProvider({
- expires: new Date(new Date().getTime()+(1000*60*60*24*365)), //一年后
- }));
- 转自http://love-love-l.blog.163.com/blog/static/21078304200871532021490/