PDA

View Full Version : a store doesn't load



flamant
5 Dec 2010, 10:01 AM
Hi,
I implemented a store for a grid and the store doesn't load



var forumJsonStore = new Ext.data.JsonStore({
proxy : new Ext.data.ScriptTagProxy({
url: '<c:url value="/forum/retirerListeDiscussion.htm"/>'
}),
storeId: 'forum',
autoload: true,
root: 'records',
totalProperty: 'totalCount',
fields: champsDiscussion,
idProperty: 'id'
});

var barrePageForum = {
xtype: 'paging',
store: forumJsonStore,
pagasize: 25,
displayInfo: true
};

var forumGrid = {
xtype: 'grid',
columns: forumColonneModel,
store: forumJsonStore,
loadMask: true,
bbar: barrePageForum
}


Thank you in advance for your answers

mankz
5 Dec 2010, 10:11 AM
Capital L, case sensitive:



autoLoad : true

flamant
5 Dec 2010, 10:42 AM
Hi mankz and thank you for your answer

When I use a paging tool bar, I need to send the start and limit parameters for the store.

Those parameters are normally controlled by the paging tool bar. So how can I tell the store to receive automatically those parameters from the paging tool bar ?

Those parameters are changing while clicking on the paging tool bar. So the store must take into account those changes

ryanyoungsma
5 Dec 2010, 12:51 PM
Instead of "autoLoad: true" use:


forumJsonStore.load({params: {start:0,limit:30}});

Place this below your store.

Condor
6 Dec 2010, 1:35 AM
Or:

autoLoad: {params: {start: 0, limit: 30}}