如何从extjs更新json文件 [英] how to update the json file from extjs

查看:472
本文介绍了如何从extjs更新json文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你能告诉我如何将数据从我的extjs datagrid更新到JSON文件?我的代码适用于从JSON文件加载静态数据。此外,当我编辑数据时,数据会被更新。但是我不知道如何将更新的数据存储到JSON文件中,以便即使我进行页面刷新或反弹我的服务器也会被反映。



谢谢



Murali S

解决方案

你不能只是更新一个json文件,在服务器上(PHP,Java,C#,其他)需要做。如果你可以直接从客户端更新一个静态文件,那将是一个巨大的安全漏洞。



Ext JS SDK中有一些例子说明如何发送数据到服务器并持续存在。


Can you please tell me how I can update the data from my extjs datagrid to JSON file?. My code works fine for loading static data from JSON file. Also, the data gets updated when I edit the data. But I am not aware how to store the updated data to JSON file so that it will be reflected even when I do page refresh or bounce my server.

Thanks

Murali S

解决方案

You can't just update a json file, something on the server (PHP, Java, C#, other) need to do it. If you could just directly update a static file from the client, it would be a giant security hole.

There are examples in the Ext JS SDK that show you how to send data to the server and persist it.

这篇关于如何从extjs更新json文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆