PDA

View Full Version : Paging toolbar and extra parameters



devnullable
29 Aug 2011, 11:37 PM
I have store that loads data from server by user given parameters:


{
xtype: 'button',
text: 'Search',
handler: function() {
myStore.load({ params : {startDate: userEnteredStartDate, endDate:userEnteredEndDate, city: userEnteredCity});
}
}

When using paging toolbar those parameters are not being sent to server again in case of page change. How can I tell paging toolbar to sent those parameters with every request?

raz0r1
30 Aug 2011, 3:55 AM
you can set the params in the extraparams of the proxy



store.getProxy().extraParams.KEY = VALUE;

e.g. in the "beforeload" event

or you set them directly in the proxy if they are static.
i can not see where you variables come from "userEnteredStartDate" and "userEnteredEndDate"

devnullable
30 Aug 2011, 7:01 AM
you can set the params in the extraparams of the proxy



store.getProxy().extraParams.KEY = VALUE;

e.g. in the "beforeload" event

or you set them directly in the proxy if they are static.
i can not see where you variables come from "userEnteredStartDate" and "userEnteredEndDate"Thank you.

Don't worry about the variables. I just wrote them like that for the example to make it clear - failing obviously :)