PDA

View Full Version : nestedlist autopaging can only pageing successfully once ,pull again no response



hs53602
12 Jul 2012, 6:58 PM
nestedlist autopaging can only pageing once ,pull again no response,can anyone help me?


Ext.define('ux.plugin.ListPaging', {
extend: 'Ext.plugin.ListPaging',
alias: 'plugin.ux-listpaging',


loadNextPage: function() {
console.log('ux-loadNextPage');
this.fireEvent('loadNextPage');

//Load the next page
this.setLoading(true);
this.scrollY = this.getScroller().position.y;
Ext.getStore('reviewStore').nextPage({ addRecords: true } );
}
});
Ext.define('MyApp.view.MyBlog', {
extend: 'Ext.Container',
requires: [

'Ext.MessageBox',
'Ext.Container'
],
xtype : 'myblog',
config: {
layout: {
type: 'fit'
},


items: [
{
xtype: 'nestedlist',
id:'reviewnestedlist',
title: '\u7533\u8FF0\u5E73\u53F0',
displayField: 'title',

listConfig: {
limit: 12,
disableSelection: true,
plugins: [ {

xclass: 'plugin.ux-listpaging',
loadMoreText: 'Load More Incidents...',
noMoreRecordsText: 'All Incidents Loaded',
autoPaging: true ,
} ,
{
xclass: 'Ext.plugin.PullRefresh' ,
}
]
},

store: {
type: 'tree',
id:'reviewStore',
fields: [
'title', 'content',
{name: 'leaf', defaultValue: true}
],

autoLoad: true,
root: {
leaf: false
},


pageSize: 12,
clearOnPageLoad: false,
proxy: {
type: 'jsonp',
url: 'http://58.1.1.1/get_goodJoker.aspx',

pageParam: 'page',
limitParam: 'rpp',
extraParams: {
q: 'sencha'
},

reader: {
type: 'json',
rootProperty: 'Discussions'
}
}
},
detailCard: {
xtype: 'panel',
scrollable: true,
styleHtmlContent: true
},
listeners: {
itemtap: function(nestedList, list, index, element, post) {
this.getDetailCard().setHtml(post.get('content'));
}
}
}
]
} //config
});