1.7.10

ExtJs calls url with OPTIONS method problem.

When I'm trying to create a Restful grid with ExtJs it calls url with OPTIONS method . I couldn't despite I explicityly define method as GET. After two days finally I find the solution ScriptTagProxy.

You can read explanation from ExtJs documentation;
"An implementation of Ext.data.DataProxy that reads a data object from a URL which may be in a domain other than the originating domain of the running page.

Note that if you are retrieving data from a page that is in a domain that is NOT the same as the originating domain of the running page, you must use this class, rather than HttpProxy."

But now there is another problem because documentation also says that;
The content passed back from a server resource requested by a ScriptTagProxy is executable JavaScript source code that is used as the source inside a script tag. In order for the browser to process the returned data, the server must wrap the data object with a call to a callback function, the name of which is passed as a parameter by the ScriptTagProxy.
 You have to send your data inside a  script. The name of the script is sending in the callback parameter of the URI like http://foo.com/bar?callback=methodName .

Hiç yorum yok:

Yorum Gönder