PDA

View Full Version : data from two or more proxies



ironhide707
18 Feb 2014, 2:53 AM
Hey all,
I have a very odd kind of a problem and i just wanted to ask about how to approach it. The thing is that i am developing a web based app using sencha and one of the requirement of this app is that it has a search capability which would show videos from different websites like youtube,dailymotion. I just wanted to know whether it is possible to show results returned from both of these sites together.I am using API`s to get the data in JSON format and using proxies to do that, would it be possible to call two or proxies at the same time in order to get the data at the same time. Would be very thankful if someone can give me insight on this regarding in sencha extjs.

P.S : i`ve heard that it may be possible using data mashups. Is it possible in sencha?

brian428
18 Feb 2014, 9:18 PM
It's certainly possible, but not with the built-in behavior of Stores and Proxies. A Store can have only one Proxy, and a Proxy can have only one URL. So it probably means making the AJAX calls yourself (with Ext.Ajax) and then building up the model instances to place into a Store. Since you're not saving the data, only loading it, this really isn't much extra work.

ironhide707
18 Feb 2014, 11:51 PM
Nice answer, I`ll look into it and let you know brain.