gpt4 book ai didi

java - sencha extjs GridPanel SaveState 格式

转载 作者:行者123 更新时间:2023-12-01 05:52:15 25 4
gpt4 key购买 nike

我有一个场景,我想将在客户端修改的 extjs GridPanel 的列顺序保存到服务器。为此,我将 extjs gridpanel 的状态保存在 cookie 中。将此 cookie 发送到服务器端并从 cookie 中检索列顺序的值。

我的问题是gridPanel以哪种格式在cookie中保存其列顺序。我应该如何从服务器端检索它。

我在服务器端得到的键值对是这样的。那么这个值是一个什么样的对象呢?是 JSON 还是其他格式。其次,这是我实现第一段中指定的场景的方法。如果你还有其他更好的办法。请给我一些建议。任何帮助将不胜感激。

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

最佳答案

为什么你关心格式?您不必关心,除非您打算在服务器上修改它。

只需在客户端发送到服务器时保存 cookie 数据,并在客户端加载页面时发送即可。

如果您确实对数据的编码方式感兴趣,请查看 src/state/Provider.js - 特别是encodeValue() 和decodeValue()。

关于java - sencha extjs GridPanel SaveState 格式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4290143/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com