我有一个场景,我希望将在客户端修改的extjs GridPanel的列顺序保存到服务器。为此我在cookie中保存extjs gridpanel的状态。将此cookie发送到服务器端并从cookie检索列顺序的值。
我的问题是gridPanel在cookie中保存其列顺序的格式。我应该如何从服务器端检索它。
我在服务器端获得的键值对就是这样的。那么这个价值是什么样的对象。是JSON还是其他格式。其次,这是我实现第一段中规定的方案的方法。如果你还有其他更好的方法。请给我一些建议。任何帮助将不胜感激。
Cookies名称ys-grid_query0和值o%3A * 列 *%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 252% 55Ewidth%25253Dn%2525253A59
答案 0 :(得分:0)
你为什么关心格式?除非您计划在服务器上修改它,否则您不必关心。
只需在客户端将cookie数据发送到服务器时保存cookie数据,并在客户端加载页面时发送它。
如果您真的对如何编码数据感兴趣,请查看src / state / Provider.js - specificl encodeValue()和decodeValue()。