问题标签 [extjs-stores]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
javascript - 如何等到所有商店都在 ExtJs 中同步?
我有一个网格列表,可以按最终用户的形式更改其数据。最后,我想通过点击按钮来同步所有的网格,然后执行一个操作。
我写了下面的代码:
问题就在这里,store.sync()
不等待回调。
推荐的方法是什么?
extjs - ExtJS 6.2 - controller keeps looking stores in my cotroller path
I'm new in extJS and i've been working in an app for some time. My problem is that I have an app with an MVC architecture and as I instatiate the controller I declare de stores. But when I run this app in the browser, for some reason the controller is trying to get the store from my controller folder. I have other controllers runing in my app and all of them looks for the store in the stores folder. Does anyone have a clue about this issue? Thanks
Browser response
extjs - 能够远程和本地过滤商店
我正在使用 Ext JS 7.1 Modern,我想知道是否有办法在本地过滤具有remoteFilter: true
.
我试图用Sencha Fiddle来解释我的情况,并附上了下面的代码。
该示例包含一个商店,该商店通过使用在names.json
和设置remoteFilter
和filters
配置中定义的动态数据来模拟对服务器的远程过滤。
检索数据后,假设用户希望通过在“搜索”字段中键入来在本地过滤检索到的数据。现在,我想在本地过滤商店,但由于remoteFilter
设置为true
,我设置的过滤器向服务器发送请求,而不是进行本地过滤。
有没有一种直接的方法来实现这个用例?这感觉像是每个人都需要的一个非常常见的用例,所以我想确保我没有遗漏任何东西。
应用程序.js
名称.json
提前致谢
extjs - List 的 PullRefresh 插件无法处理 ChainedStore 的可能性
使用 Ext JS 7.1 Modern,我准备了一个示例来说明问题。
当我的主商店有远程过滤器时,将 绑定dataview.List
到ChainedStore
正确处理我的本地过滤。但是,当我还将PullRefresh
插件添加到列表时,在拉刷新期间出现错误。我从源代码中看到该插件没有考虑列表的商店可以是ChainedStore
.
我试图用Sencha Fiddle来解释这个问题,并附上了下面的代码。
我已经通过覆盖插件的fetchLatest
andonLatestFetched
方法暂时解决了这个问题,如果列表的商店是. 但我相信必须更新源代码才能处理这种情况。Ext.dataview.pullrefresh.PullRefresh
source
ChainedStore
应用程序.js
名称.json
App.override.dataview.pullrefresh.PullRefresh:
提前致谢
extjs - 如何将 ExtJS AJAX 代理返回的原始数据对象修改为 JSON 对象以供 Tree Store 使用
为了创建树形面板,我使用树形存储对其进行配置,其 AJAX 代理 url 接收我无法控制的 json 数据。但是在 readRecords 执行之前使用Ext.data.reader.Json
'stransform
属性invokable 可以将传递的原始(反序列化)数据对象从 AJAX 代理修改为修改后的或全新的数据对象。该transform
配置给出了下面的代码片段:
我想要一个关于如何修改返回 JSON 对象的示例
放入适合树存储的 JSON 对象。
层次树将被渲染以使用返回的 JSON 中的条件显示哪个用户属于哪个管理员administrator==true
,然后是返回此处显示的该管理员用户的第二个 AJAX 请求。