从 ExtJs JsonStore 访问 piggybag 属性,有可能吗? | 珊瑚贝

Accessing piggybag property from a ExtJs JsonStore, is it possible?


假设我有一个 ExtJs Grid,它利用 JsonStore 存储数据集,例如:

1
2
3
4
5
6
7
{
    mode: ‘piggy’,
    records: [
        {name: ‘record1’,…},
        {name: ‘record2’,…}
    ]
}

根植于记录,网格显示正常。现在我可以从存储对象访问”模式”属性吗?它在行数据旁边包含一些关于我的网格的元数据,打开另一个到服务器的 Ajax 连接来获取元数据值肯定是一种浪费。有人做过吗?


您应该仍然可以访问响应中返回的原始 JSON 数据。
可能有多种方法可以实现,但这里有一种:

store.proxy.reader.rawData 或 jsonData

  • 是的!这样可行!我在发帖 5 分钟后发现了确切的解决方案,并打算重播我自己的问题,但 stackoverflow 不允许我在第一篇帖子的 8 小时内回复。
  • 没关系,请随意接受答案,它可能对其他人也有用,并且通过标记接受的答案您将获得积分。但是,您回答自己的问题不会获得任何积分。


来源:https://www.codenong.com/18886785/

微信公众号
手机浏览(小程序)

Warning: get_headers(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(): Failed to enable crypto in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(https://static.shanhubei.com/qrcode/qrcode_viewid_8949.jpg): failed to open stream: operation failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57
0
分享到:
没有账号? 忘记密码?