PDA

View Full Version : [FIXED][3.0rc1] PagingToolbar - config application



Omenus
19 Apr 2009, 5:05 AM
there is a bug:
just edit a file: examples/grid/paging.js in line 50


var pagingBar = new Ext.PagingToolbar({
pageSize: 25,
store: store,
displayInfo: true,
displayMsg: 'Displaying topics {0} - {1} of {2}',
emptyMsg: "No topics to display",
beforePageText:"MyPageText",//it works in 2.2.1 but in extjs 3RC1 not ;(
items:[
'-', {
pressed: true,
enableToggle:true,
text: 'Show Preview',
cls: 'x-btn-text-icon details',
toggleHandler: function(btn, pressed){
var view = grid.getView();
view.showPreview = pressed;
view.refresh();
}
}]
});
please to verify it.
:-/

mjlecomte
19 Apr 2009, 5:00 PM
I moved your thread, you shouldn't piggy back your report to another thread that is a separate issue.

I confirm this is a bug. Looks like the config in the constructor is not applied early enough. There's some setup with pagingItems that occurs before the config object is applied to the class so the configs don't get applied.

evant
20 Apr 2009, 6:51 AM
I've moved the button creation to initComponent, which now means that the beforePageText option will work correctly.

mjlecomte
20 Apr 2009, 7:24 AM
Looks good.

Gentle reminder: it would probably be helpful (to some) to yank out pagingItems to have some set up method so people could override the pagingItems a little easier. overriding initComponent is more difficult IMHO.