Extjs 4 data store and php
-
I wanna know if it's possible to call php api like in extjs 3.x.x. Let me explain, I have a store and I want to get data from php : Ext.define('KY.store.watcherStore',{ extend: 'Ext.data.Store', model: 'KY.model.WatcherModel', proxy: { type: 'ajax', url : '/admin/rest/ksThresholdWatcher/loadAllRef', //reader: { // type: 'json' //}, } }); The url param calls ksThresholdWatcher.php method loadAllRef (I have a php rest api); but it never calls my php script. I'm stuck, I don't now how to do, all examples I see set url param like this url:'myPHP.php'. How can I make it work my way ?
-
Answer:
You need to specify that the your proxy is type: 'rest' in the config. Here is an http://dev.sencha.com/deploy/ext-4.0.7-gpl/examples/restful/restful.html the restful way. http://edspencer.net/2011/02/proxies-extjs-4.html also has some good pointers on proxy usage. You can use the api proxy config item in 4.x.x to specify different sources for the different request operations (CREATE, UPDATE, DESTROY, READ).
user1167186 at Stack Overflow Visit the source
Related Q & A:
- What is the best data model and database systems to store social graph?Best solution by Quora
- Is Using Gmail to Store Application Data a Violation of their Terms of Service?Best solution by Quora
- How to store large ordered data?Best solution by Stack Overflow
- How to install PHP 4.4 on Ubuntu?Best solution by Ask Ubuntu
- How can I extract data of an external XML to PHP?Best solution by Stack Overflow
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.