PDA

View Full Version : ListPagingPlugin will not work?



hotdp
18 Jul 2011, 4:57 AM
Hello I can not get ListPagingPlugin to work
It shows all items (55). But i can see the pageSize is 25.
The "Load more" is visible but all items are visible all the time.


xxx.stores.reciepes.proxy.extraParams.id = group.data.id;
xxx.stores.reciepes.read(function() {
var recipes = new Ext.List({
plugins: [
{
ptype: 'listpaging',
autoPaging: false
}, {
ptype: 'pullrefresh'
}
],
store: xxx.stores.reciepes,
emptyText: '<div class="noListItems">nothing.</div>',
itemTpl: new Ext.XTemplate(
'<tpl for=".">',
'<div class="recipeList">',
'<div class="recipeListImage"><img src="{image}" /></div>',
'<div class="recipeContent">',
'<span class="recipeName">{name}</span>',
'<span class="recipeText">{teaser}</span>',
'<div class="recipeTime">',
'<em>Tid:</em>',
'<i>{time}</i>',
'<em>&nbsp;|&nbsp;</em>',
'<span class="oneStar"></span>',
'</div>',
'</div>',
'</div>',
'</tpl>',
{
compiled: true
}
),
id:'recipesListID',
cls: 'recipes',
listeners: {
itemtap: function (reciptDv, reciptindex) {
loadRecipt(reciptDv.store.getAt(reciptindex).data.id);
}
}
});
xxx.views.RecipesList.setActiveItem(recipes, false);
});




xxx.stores.reciepes = new Ext.data.Store({
model: 'RecipesModel',
remoteFilter: true,
clearOnPageLoad: false
});




Ext.regModel('RecipesModel', {
fields: [
{ name: 'name', type: 'string' },
{ name: 'id', type: 'string' },
{ name: 'teaser', type: 'string' },
{ name: 'time', type: 'string' },
{ name: 'image', type: 'string' },
{ name: 'rating', type: 'string' }
],
proxy: {
url: server + '/recipes/bycategory',
type: 'scripttag',
extraParams: {
id: ''
},
reader: {
root: 'items'
}
}
});