android - Sencha phonegap JSON request (with WordPress backend) returning only 5 items -


i creating app using sencha-touch 2 , phonegap. app online newspaper. have jsonp request store of articles. json request wordpress using json api. when view app on web browser number of articles correct when build on android phone 5 articles appear, no matter "count" parameter input request.

here articlelist.js (which includes piece of static information)

ext.define('commentator.store.article', {   extend: 'ext.data.store',   requires: [     'commentator.model.article',     'ext.data.proxy.jsonp'   ],     config: {     storeid: 'articlestore',     autoload: false,     model: 'commentator.model.article',     proxy: {       timeout: 3000,       type: 'jsonp',       url: 'http://[site]/?json=get_category_posts?id=features&post_status=publish',       reader: {         type: 'json',         rootproperty: 'posts'       }     }   } }); 

here main.js

ext.define('commentator.controller.main', {   extend: 'ext.app.controller',    config: {     refs: {       list: 'articles',       side_list: 'side_menu',       navbtn : 'button[name="burgerbutton]',       topbar: 'topbar'     },     control: {       list: {         ondatarefresh: 'updatelist',         tap: 'updatelist'       },       topbar: {         initialize: 'swipebar'       }     }   },    swipebar: function(evt) {       evt.element.on({         swipe: function(e, node, options){           if (ext.viewport.getmenus().left._hidden) {             if(e.direction == "right") {               ext.viewport.showmenu("left");             }           } else {             ext.viewport.hidemenu("left");           }         }       });   },   updatelist: function() {     console.log(this.getlist());   },    //called when application launched, remove if not needed   launch: function(app) {    ext.getstore("articlestore").load(function(records, options, success) {      console.log(records);       if(!success) {         for(var = 0; < 5; i++) {           console.log("errror");           ext.getstore("articlestore").load();         }       }     });       commentator.view.subnavigation.setmenu();     //});   }  }); 

article.js (the store)

ext.define('commentator.store.article', {   extend: 'ext.data.store',   requires: [     'commentator.model.article',     'ext.data.proxy.jsonp'   ],     config: {     storeid: 'articlestore',     autoload: false,     model: 'commentator.model.article',     proxy: {       timeout: 3000,       type: 'jsonp',       url: 'http://[site]/?json=get_category_posts?id=features&post_status=publish',       reader: {         type: 'json',         rootproperty: 'posts'       }     }   } }); 

i found solution our problem. problem wordpress json api. switched on thermal api , works perfectly.


Comments

Popular posts from this blog

user interface - How to replace the Python logo in a Tkinter-based Python GUI app? -

objective c - Greedy NSProgressIndicator Allocation -

how to set an OCR language in Google Drive -