extjs 4 树存储 RESTful
我正在使用 Extjs 4 Tree,以 Rails 3 作为后端和想知道 TreeStore 是否有任何 REST 支持,因为我们有它用于数据存储?我尝试了很多谷歌搜索,但找不到任何完整的教程。 我想动态地将节点添加到树中树存储应该同步,以便下次树加载时新创建的节点也存在。
i m working with Extjs 4 Tree with Rails 3 as backend & was wondering is there any REST support as for TreeStore as we have it for data store? I tried a lot of googling but could nt find any full fledged tutorial..
I want to dynamically add nodes to tree & tree store should be synchronized so that next time tree loads newly created node also exists..
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的。这由您选择的代理处理。只需将
Ext.data.TreeStore
的代理设置为type:rest
即可。请参阅以下内容以供参考:
http://docs.sencha.com/ext-js/4-0/#!/api/Ext.data.TreeStore-cfg-proxy
和
http://docs.sencha.com/ ext-js/4-0/#!/api/Ext.data.proxy.Rest
Yes. This is handled by your chosen proxy. Simply set the
Ext.data.TreeStore
's proxy totype: rest
.Please see the following for reference:
http://docs.sencha.com/ext-js/4-0/#!/api/Ext.data.TreeStore-cfg-proxy
and
http://docs.sencha.com/ext-js/4-0/#!/api/Ext.data.proxy.Rest