PDA

View Full Version : Problem with



pschramm
27 Nov 2012, 9:16 AM
I have 2 grids where the pagination controls have flipped.. The toolbar definitions seem the same though? Code below.. Any help is appreciated!

40377




tbar: new Ext.PagingToolbar({
pageSize: 20,
store: store,
displayInfo: true,
ctCls: 'x-display',
displayMsg: '<spring:message code="DevelopmentHome.DISPLAYING_DEVELOPMENT"/> {0} - {1} of {2}',
emptyMsg: "<spring:message code="DevelopmentHome.NO_DEVELOPMENT_TO_DISPLAY"/>",
prependButtons: true,
items: [
{
xtype: 'button',
text: '<spring:message code="CommonFormElements.VIEW_ALL"/>',
iconCls: 'x-view',
handler: function(e) {
var developmentPaging = this.findParentByType('paging');
if (developmentPaging.viewAll != true) {
developmentPaging.viewAll = true;
developmentPaging.pageSize = <%=MiscC.INFINITY%>;
developmentPaging.moveFirst();
this.setText('<spring:message code="CommonFormElements.VIEW_PAGINATED"/>');
} else {
developmentPaging.viewAll = false;
developmentPaging.pageSize = 20;
developmentPaging.moveFirst();
this.setText('<spring:message code="CommonFormElements.VIEW_ALL"/>');
}
}
}
]
}),

bottom toolbar



tbar: new Ext.PagingToolbar({
pageSize: 25,
store: store,
displayInfo: true,
ctCls: 'x-display',
displayMsg: '<spring:message code="EditTicket.DISPLAYING_EVENTS"/> {0} - {1} of {2}',
emptyMsg: "<spring:message code="EditTicket.NO_EVENTS_TO_DISPLAY"/>",
prependButtons: true,
items: [
{
xtype: 'button',
text: '<spring:message code="CommonFormElements.VIEW_ALL"/>',
iconCls: 'x-view',
handler: function(e) {
var paging = this.findParentByType('paging');
if (paging.viewAll != true) {
paging.viewAll = true;
paging.pageSize = <%=MiscC.INFINITY%>;
paging.moveFirst();
this.setText('<spring:message code="CommonFormElements.VIEW_PAGINATED"/>');
} else {
paging.viewAll = false;
paging.pageSize = 25;
paging.moveFirst();
this.setText('<spring:message code="CommonFormElements.VIEW_ALL"/>');
}
}
}

mitchellsimoens
29 Nov 2012, 12:55 PM
Are you defining this in a class declaration (Ext.define) or in a config object when you are creating an instance?