Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/extjs/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
ExtJS 4 DirectProxy同时存储负载_Extjs_Ext Direct - Fatal编程技术网

ExtJS 4 DirectProxy同时存储负载

ExtJS 4 DirectProxy同时存储负载,extjs,ext-direct,Extjs,Ext Direct,我有两个不同型号但直接代理配置相同的商店。当我加载这两个存储时(同时为两个存储调用store.load()),ext只发送一个请求(包含两个加载),而第二个存储没有填充数据。我尝试将batchActions设置为false,但没有成功。我在服务器端使用extdirectspring 代理配置: proxy: { type: 'direct', batchActions:false, directFn:doctorDirectController.g

我有两个不同型号但直接代理配置相同的商店。当我加载这两个存储时(同时为两个存储调用store.load()),ext只发送一个请求(包含两个加载),而第二个存储没有填充数据。我尝试将batchActions设置为false,但没有成功。我在服务器端使用extdirectspring

代理配置:

proxy: { type: 'direct', batchActions:false, directFn:doctorDirectController.getAll, reader:{ type:'json', root:'records' } } 代理:{ 类型:'直接', 批处理操作:false, directFn:doctorDirectController.getAll, 读者:{ 类型:'json', 根:'记录' } } 当我将超时设置为1秒时,一切正常:

this.doctorStore1.load(); var me = this; setTimeout(function() { me.doctorStore2.load(); }, 1000); this.doctorStore1.load(); var me=这个; setTimeout(函数(){ me.doctorStore2.load(); }, 1000); 因此,有两个问题:

  • 如何强制directproxy不批处理getAll请求
  • 为什么第二个存储区没有填充数据?请求和响应包含匹配的TID

  • 原来是弹簧的问题。为了处理实体之间的循环引用(这会在jackson序列化过程中导致问题),我使用了以下注释

    @JsonIdentityInfo(generator=ObjectIdGenerators.IntSequenceGenerator.class, property="@doctorId") @JsonIdentityInfo(generator=ObjectiveGenerators.IntSequenceGenerator.class,属性=“@doctorId”) 当同时发生两个存储加载时,它们在一个批中序列化,并在一个响应中发回。上面的注释在json序列化过程中删除了所有重复项,导致第二个存储区没有填充数据