Access values from cookies using sencha extjs
I am pretty new to sencha as well as JavaScript. So can you please help me with how to use Sencha ExtJS and extract information from cookies. I have set the state of a gridpanel in cookies and now I want to extract the value of columnOrder and other information from cookies.
Any code or reference will be r开发者_高级运维eally appreciated.
First thing - if you haven't found these already, here is a link to the Ext docs:
http://docs.sencha.com/extjs
Second - here is a link to Ext.util.Cookies:
http://docs.sencha.com/extjs/4.2.1/#!/api/Ext.util.Cookies
Example of use:
// write cookie
var myCookie = Ext.util.Cookies.set('YourCookieName', 'YourValue');
// read cookie
Ext.util.Cookies.get('YourCookieName');
Write cookie
var myCookie = Ext.util.Cookies.set('YourCookieName', 'YourValue');
Read cookie
Ext.util.Cookies.get('YourCookieName');
精彩评论