Ext JS ComboBox 动态行为
我试图根据另一个组合框的 valueField(这个位于顶部栏中的网格之外)在组合框中加载/显示完全不同的一组值(这个组合框作为编辑器驻留在 EditorGridPanel 中)。我已经看过一个教程(http://www .extjs.com/learn/Tutorial%3ALinked%5FCombos%5FTutorial%5Ffor%5FExt%5F2),其中辅助对象的所有值都存储在本地然后进行过滤,但是,我已经创建了一个将提供的链接我使用基于 valuefield 的 json 数据,所以我想使用这个 url 来保持代码高效。
我还尝试刷新数据存储,但它根本没有反映在组合框中。
请指教
谢谢
I am trying to load/show completely different set of values in a combobox(this one resides as a editor within an EditorGridPanel) based on the valueField of another combobox(this one resides outside the grid in top bar). I have already seen a tutorial(http://www.extjs.com/learn/Tutorial%3ALinked%5FCombos%5FTutorial%5Ffor%5FExt%5F2) wherein ALL the values for the secondary object are stored locally and then filtered however, I have already created a link which will supply me with json data based on the valuefield, so I would like to use this url to keep the code efficient.
I have also tried to refresh the datastore but its simply not being reflected on the combobox.
Please advise
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
找到了解决方案,从 url 加载值很简单。如果你想操纵查询(就像我想要的那样),你必须从动态参数中剥离 url 并将它们分配给商店的 baseParams,然后调用 store.load ()
这对我有用!!
Found the solution, loading values from a url is straightforward.. if you want to manipulate the query(like I wanted), you would have to strip url off the dynamic parameters and assign them to baseParams of the store and then call store.load()
It worked for me!!