Results 1 to 2 of 2

Thread: Problem with

  1. #1
    Sencha Premium Member
    Join Date
    Apr 2011
    Posts
    31
    Vote Rating
    0
      0  

    Default 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 - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,317
    Answers
    3883
    Vote Rating
    1291
      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 @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it!

    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.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •