1. #1
    Sencha Premium Member
    Join Date
    Apr 2011
    Posts
    31
    Vote Rating
    0
    pschramm is on a distinguished road

      0  

    Default Unanswered: Problem with

    Unanswered: Problem with


    I have 2 grids where the pagination controls have flipped.. The toolbar definitions seem the same though? Code below.. Any help is appreciated!

    1.png

    Code:
     
    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

    Code:
     
            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"/>');
                            }
                        }
                    }

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,821
    Answers
    3470
    Vote Rating
    836
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Are you defining this in a class declaration (Ext.define) or in a config object when you are creating an instance?
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

Thread Participants: 1

Tags for this Thread