PDA

View Full Version : [CLOSED] Is there a way to merge stores from multiple sources?



michaeld
Sep 11, 2013, 10:26 AM
Is there some way I can use a grid to show content from merged external sources (ajaxproxy)?

I am using an external json service to retrieve search results but results are unreliable if I only do a single search. I need to do one based on elements in the name and one based on other parameters.

Any insight on how this can be done would be helpful. Also, this must be done on the client-side. Also the resultset is the same so modelfield is unchanged.

michaeld
Sep 11, 2013, 10:35 AM
Just a thought but could I use the same store, change the url, set addRecords:true, then reload?

Daniil
Sep 11, 2013, 1:32 PM
Hi @michaeld,

It can be addressed this way:

<ext:Store>
<Listeners>
<BeforeLoad Handler="operation.addRecords = true;" />
</Listeners>
</ext:Store>

michaeld
Sep 12, 2013, 12:04 AM
It can be addressed this way:

<ext:Store>
<Listeners>
<BeforeLoad Handler="operation.addRecords = true;" />
</Listeners>
</ext:Store>

I don't understand. Are you trying to pose that's the proper way to make the store accept adds instead of replace if I follow the steps I indicated in the 2nd message?

Could you elaborate?

Daniil
Sep 12, 2013, 7:32 AM
Yes, a way to avoid removing previously loaded records on subsequent load requests of Store's Proxy is to use the addRecords: true option.