Besides AjaxProxy
, ScriptTagProxy
is the other server proxy which helps us to persist the model on a remote server and load it from the same. The only catch is that this proxy is used only when the domain where the server is running is different from the domain where the application is running, for example, loading the search detail from the Google Custom search API. This recipe outlines the usage of ScriptTagProxy
to make cross-domain URL calls.
Make sure that you have set up your development environment by following the recipes outlined in Chapter 1.
Carry out the following steps:
Create and open a new file named
ch05_14.js
and paste the following code into it:Ext.setup({ onReady: function() { Ext.regModel('SearchResult', { fields: [ {name: 'kind', type: 'string'}, {name: 'title', type: 'string'}, {name: 'htmlTitle', type: 'string'}, {name: 'displayLink', type...