PDA

View Full Version : [CLOSED]Synchronizing Ext.data.Store with Ext.PagingToolbar



hschaefer123
12 Jul 2010, 6:28 AM
For better BackEnd Support of Grid Paging i used the store property "paramNames"
to prefix all used params with an leading "_" underscore like "_start".
This makes is easy on the server side differ between real data and controlling fields like sort, page, etc.

The problem is that the PagingToolbar has hardcoded params name that refer to the default "start" & "limit".
It would be helpful, if the PagingToolbar would also be able to support different paramNames, even
better if the paging toolbar would use the property paramNames config object from the store!

Any chance to get this into upcomming release?

I will not make my own component replacing all hardcoded param names to support upcomming releases.

Best wishes,
Holger Schäfer

Condor
12 Jul 2010, 6:49 AM
Which Ext version? The current Ext 3.2.1 doesn't hardcode those values in PagingToolbar, they can be specified in PagingToolbar or uses the ones specified in the store.

ps. start and limit are still hardcoded in ComboBox, but that should be fixed in the next release.

evant
12 Jul 2010, 6:00 PM
Correct, the param names aren't hard coded, all of them should be fixed for 3.3.

hschaefer123
14 Jul 2010, 5:58 AM
Thanks for quick Feedback,
i checked out that 3.2.1 is working for grid with pagingtoolbars,
but i also got the problems using comboboxes.

Is the store param overide the prefered way of doing this globally (concerning 3.3)?

// overide default store param names
Ext.override(Ext.data.Store, {
defaultParamNames : {
_start : '0',
_limit : 'l0',
_sort: '',
_dir : 'ASC'
},
paramNames : {
start : '_start',
limit : '_limit',
sort : '_sort',
dir : '_dir'
}
});

Best wishes,
Holger