{"id":351,"date":"2016-09-13T05:45:47","date_gmt":"2016-09-13T05:45:47","guid":{"rendered":"http:\/\/waynenguyen.org\/dev\/?p=351"},"modified":"2016-09-13T05:46:40","modified_gmt":"2016-09-13T05:46:40","slug":"ext-js-component-cannot-display-data-read-from-proxy","status":"publish","type":"post","link":"https:\/\/bruceng.com\/dev\/?p=351","title":{"rendered":"Ext JS component cannot display json data read from proxy"},"content":{"rendered":"<p>Not entirely sure why, but when using ajax proxies, specifying the URL is not enough, the data won&#8217;t be displayed on lists\/panels.<\/p>\n<p>A reader must also be defined in the proxy, otherwise the data will not be read correctly<\/p>\n<p>proxy: {<br \/>\ntype: &#8216;ajax&#8217;,<br \/>\nurl: &#8216;data.json&#8217;,<br \/>\nreader:{<br \/>\ntype:&#8217;json&#8217;,<br \/>\nrootProperty: &#8216;DATA&#8217;<br \/>\n}<\/p>\n<p>}<\/p>\n<p>Make sure that<\/p>\n<ul>\n<li>the source data is working, test using Fiddler\/POSTMan\/etc<\/li>\n<li>The model&#8217;s fields match the fields in json data, case-sensitive.<\/li>\n<li>A reader is configured in the proxy<\/li>\n<li>rootProperty is set correctly and match the json data, case-sensitive.<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Not entirely sure why, but when using ajax proxies, specifying the URL is not enough, the data won&#8217;t be displayed on lists\/panels. A reader must also be defined in the proxy, otherwise the data will not be read correctly proxy: { type: &#8216;ajax&#8217;, url: &#8216;data.json&#8217;, reader:{ type:&#8217;json&#8217;, rootProperty: &#8216;DATA&#8217; } } Make sure that the &hellip; <a href=\"https:\/\/bruceng.com\/dev\/?p=351\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Ext JS component cannot display json data read from proxy&#8221;<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[8,20,13,55],"class_list":["post-351","post","type-post","status-publish","format-standard","hentry","category-problems","tag-ext-js","tag-javascript","tag-json","tag-web-service"],"_links":{"self":[{"href":"https:\/\/bruceng.com\/dev\/index.php?rest_route=\/wp\/v2\/posts\/351","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bruceng.com\/dev\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bruceng.com\/dev\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bruceng.com\/dev\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/bruceng.com\/dev\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=351"}],"version-history":[{"count":2,"href":"https:\/\/bruceng.com\/dev\/index.php?rest_route=\/wp\/v2\/posts\/351\/revisions"}],"predecessor-version":[{"id":353,"href":"https:\/\/bruceng.com\/dev\/index.php?rest_route=\/wp\/v2\/posts\/351\/revisions\/353"}],"wp:attachment":[{"href":"https:\/\/bruceng.com\/dev\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=351"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bruceng.com\/dev\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=351"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bruceng.com\/dev\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=351"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}