使用网格和代理仅通过一个 url 读取和保存数据 (ExtJS 4)
我不太了解 ExtJS 中代理背后的想法。我可以使用简单的函数来仅使用一个 URL 来读取和保存数据吗?例如,当我想要读取数据时:users.read()
以及当我想要保存网格的新字段和已编辑字段时:users.save()
?
I didn't understand well the idea behind of proxies in ExtJS. Can I use simple functions with them in order to read and save data using only one url? Such as when I want to read data: users.read()
and when I want save the new and edited fields of a grid: users.save()
?
是的,您可以使用
users.save()
和users.read()
等函数,并且此函数将使用您在 Proxy 中为这些方法提供的 url。或者
yes you can use functions as
users.save()
andusers.read()
and this functions will use urls which you provide for these methods in Proxy.or