sencha extjs GridPanel SaveState format
I have a scenario where in I want to save the column order of extjs GridPanel which is modified at client side to the server. For that I am saving the state of extjs gridpanel in cookie. Sending this cookie to server side and retrieving the value of column order from cookie.
My question is in which format does the gridPanel save its column order in cookie. And how should i retrieve it from server side.
the key value pair which I ge开发者_开发技巧t at server side is something like this. So what kind of object is this value. Is it JSON or some other format. Secondly this is my approach to achieve the scenario specified in first para. If you have some other better way to do. Please give me some suggestion. Any help will be greatly appreciated.
Cookies name ys-grid_query0 and value o%3A*columns*%3Da%253Ao%25253Aid%25253Ds%2525253Acalled_phone_number%25255Ewidth%25253Dn%2525253A119%255Eo%25253Aid%25253Ds%2525253Acallers_phone_no%25255Ewidth%25253Dn%2525253A100%255Eo%25253Aid%25253Ds%2525253Adoe%25255Ewidth%25253Dn%2525253A109%255Eo%25253Aid%25253Ds%2525253Apnm_phone_number_id%25255Ewidth%25253Dn%2525253A119%255Eo%25253Aid%25253Ds%2525253Acompany_account_name%25255Ewidth%25253Dn%2525253A126%255Eo%25253Aid%25253Ds%2525253Acall_id%25255Ewidth%25253Dn%2525253A94%255Eo%25253Aid%25253Ds%2525253Acall_time%25255Ewidth%25253Dn%2525253A109%255Eo%25253Aid%25253Ds%2525253Aid%25255Ewidth%25253Dn%2525253A59%255Eo%25253Aid%25253Ds%2525253Auoe%25255Ewidth%25253Dn%2525253A94%255Eo%25253Aid%25253Ds%2525253Adlu%25255Ewidth%25253Dn%2525253A109%255Eo%25253Aid%25253Ds%2525253Aulu%25255Ewidth%25253Dn%2525253A94%255Eo%25253Aid%25253Ds%2525253Acore_estaleanetwork_id%25255Ewidth%25253Dn%2525253A142%255Eo%25253Aid%25253Ds%2525253Aversion%25255Ewidth%25253Dn%2525253A59
Why do you care about the format? You shouldn't have to care, unless you plan on modifying it on the server.
Just save the cookie data when the client sends it to the server, and send it whenever the client loads the page.
If you're really interested in how the data are encoded, look in src/state/Provider.js - particularl encodeValue() and decodeValue().
精彩评论