1. #111
    Ext User
    Join Date
    Oct 2009
    Posts
    3
    Vote Rating
    0
    Boing is on a distinguished road

      0  

    Default


    I tried placing the override in various places of the html page, of the scripts, etc. Where would you recommend that I place the Ext.override blip? Thanks!

  2. #112
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    91
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    It's an override of existing Ext code, so you should include it directly after ext-all.js.

  3. #113
    Ext User
    Join Date
    Apr 2010
    Location
    Orlando, FL
    Posts
    61
    Vote Rating
    0
    george4rotech is on a distinguished road

      0  

    Default isFiltered seems misimplemented in two ways

    isFiltered seems misimplemented in two ways


    The isFiltered method seems misimplemented in a couple of ways. First it's currently implemented as follows:

    Code:
    return this.snapshot && this.snapshot != (this.allData || this.data);
    But I think the following is what was actually intended:

    Code:
    return this.snapshot && this.snapshot != this.allData && this.snapshot != this.data;
    But even the above simple fix to the apparent logic error does not "work" (for me, it always returns true), because the references will not necessarily be equal, although the underlying data is, due to how applyPaging is implemented. applyPaging does not assign/copy references, but rather it creates a new MixedCollection and then sets items/keys on it.

    Here's some code I wrote, that gives me the boolean value I would expect from the isFiltered() method; the code is from the datachanged listener on a store, but where the scope is the grid. The key idea being, however, that to compare objects, or in this case the useful "keys" array, I first represent the array as a string.

    Hope this helps.

    Code:
        if (this.store.snapshot) {
                    //work around mis-implementation of PagingStore's isFiltered() method:
                    var commaDelimitedSnapshotKeys = this.store.snapshot.keys.join(',');
                    if (commaDelimitedSnapshotKeys != this.store.allData.keys.join(',')
                        && commaDelimitedSnapshotKeys != this.store.data.keys.join(',')) {
                        //etcetera

  4. #114
    Ext User
    Join Date
    May 2010
    Posts
    1
    Vote Rating
    0
    mvassau is on a distinguished road

      0  

    Default


    I was struggling with the same thing as Boing and in looking at the 3.2.1 source (line 48002) the override should use doRefresh not refresh:

    Code:
    Ext.override(Ext.PagingToolbar, {
        doRefresh: function () {
            delete this.store.lastParams;
            this.doLoad(this.cursor);
        }
    });
    Thought I'd pass this along for others having the same issue.

    BTW, Thanks Condor for the awesome UX.

  5. #115
    Sencha Premium Member
    Join Date
    Oct 2009
    Location
    Germany
    Posts
    330
    Vote Rating
    1
    PranKe01 is on a distinguished road

      0  

    Default


    Maybe all the fixed should be implemented in the code of the first post

  6. #116
    Ext User
    Join Date
    May 2010
    Posts
    1
    Vote Rating
    0
    chakrics is on a distinguished road

      0  

    Default


    Thanks for cool widget, works great for me . BTW I did use doRefresh as refresh doesn't work.

  7. #117
    Ext User
    Join Date
    Apr 2010
    Location
    Orlando, FL
    Posts
    61
    Vote Rating
    0
    george4rotech is on a distinguished road

      0  

    Default local sorting error

    local sorting error


    Let me preface this by repeating, I too am thankful for this component. Please consider my grid/x-type definition below. I've included it in its entirety, including a couple of plug-ins, which are beside the point, but nevertheless demonstrate how well this component plays with other extensions/plug-ins, which was the thing that impressed me to begin with! To duplicate the issue without the plug ins though some of that code may need to be removed.

    Ok, my issue is that, when trying to do local sorting, I'm getting the following error:

    this.fields.get(f) is undefined
    http://localhost:9080/app/scripts/PagingStore.js
    Line 183

    "f" I believe should hold the field name, but when using Firebug, this is undefined for some reason. Thanks in advance for any and all guidance in solving this issue. Note that the data initialized below as [] is being populated through a call to loadData in the "refOwner" component. Let me know if this is not clear or if I can provide a screenshot to help demonstrate.

    Code:
    Client.app.management.useraccess.LocationGrid = Ext.extend(Ext.grid.GridPanel, {
        initComponent : function() {
            this.store = new Ext.ux.data.PagingStore({
                autoDestroy : true,
                reader : new Ext.data.ArrayReader({}, [{
                    name : 'locId', mapping: 'locId'
                    }, {
                    name : 'locName', mapping: 'locName'
                    }, {
                    name : 'locCity', mapping: 'locCity'
                    }, {
                    name : 'locState', mapping: 'locState'
                    }, {
                    name : 'hasAccess', mapping: 'hasAccess'
                }]),
                data : [],
                lastOptions: {params: {start: 0, limit: 25}},
                remoteSort: false
            });
            
            var checkColumn =  new Ext.grid.CheckColumn({
                header: 'Access Granted',
                sortable: true,
                resizable: false,
                width: 100,
                dataIndex: 'hasAccess',
                align: 'center',
                fixed: true
            });
            
            this.columns = [{
                xtype: 'gridcolumn',
                header: 'Client Location Number',
                sortable: true,
                resizable: true,
                width: 175,
                dataIndex: 'locId',
                align: 'left'
            }, {
               xtype: 'gridcolumn',
               header: 'Client Location Name',
               sortable: true,
               resizable: true,
               width: 175,
               dataIndex: 'locName',
               align: 'left'
            }, {
               xtype: 'gridcolumn',
               header: 'Client Location City',
               sortable: true,
               resizable: true,
               width: 175,
               dataIndex: 'locCity',
               align: 'left'
            }, {
               xtype: 'gridcolumn',
               header: 'Client Location State',
               sortable: true,
               resizable: true,
               width: 175,
               dataIndex: 'locState',
               align: 'left'
            }, 
            checkColumn
            ]
            
            this.filters = new Ext.grid.GridFilters({ 
                local: true
                ,filters: [
                    {type: 'numeric', dataIndex: 'locId'}
                    ,{type: 'string', dataIndex: 'locName'}
                    ,{type: 'string', dataIndex: 'locCity'}
                    ,{type: 'string', dataIndex: 'locState'}
                ]
            });
                    
            this.plugins = [checkColumn, this.filters];
                            
            this.bbar = new PagingToolbar({
                store: this.store
                ,displayInfo: true
                ,displayMsg: 'Displaying locations {0} - {1} of {2}'
                ,emptyMsg: "No locations to display"
            });
                            
            this.tbar =  {
                xtype: 'toolbar',
                items: [{
                    xtype: 'button',
                    text: 'Save User Access',
                    listeners: {'click': function() {this.refOwner.onSaveUserClick();}, scope: this}
                }]
            };
                                   
            Client.app.management.useraccess.LocationGrid.superclass.initComponent.call(this);
        }
    });
    
    Ext.reg("useraccesslocationgrid", Client.app.management.useraccess.LocationGrid);

  8. #118
    Ext User
    Join Date
    Apr 2010
    Location
    Orlando, FL
    Posts
    61
    Vote Rating
    0
    george4rotech is on a distinguished road

      0  

    Default


    Adding the following two lines to the top of PagingStore.js's "sortData" method fixed my issue. Could this be a compatability issue with ExtJS 3.2.1? Because I see that Ext.data.Store.applySort method on line 21976 of ext-3.2.1/ext-all-debug.js calls sortData with no arguments, but PagingStore's sortData expects two arguments

    Code:
        sortData: function(f, direction) {
            f = this.sortInfo.field;
            direction = this.sortInfo.direction;
            //etcetera

  9. #119
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    91
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    I'll try working on an Ext 3.2.1 compatible PagingStore (including multi-field sort) this weekend

  10. #120
    Ext User
    Join Date
    Apr 2010
    Location
    Orlando, FL
    Posts
    61
    Vote Rating
    0
    george4rotech is on a distinguished road

      0  

    Default


    Quote Originally Posted by Condor View Post
    I'll try working on an Ext 3.2.1 compatible PagingStore (including multi-field sort) this weekend
    Awesome thanks we will look forward to it!

Thread Participants: 106

  1. Animal (3 Posts)
  2. galdaka (2 Posts)
  3. cgi-bin (4 Posts)
  4. tchitani (4 Posts)
  5. tobiu (1 Post)
  6. steffenk (1 Post)
  7. renaudham (1 Post)
  8. markpele (1 Post)
  9. Sesshomurai (1 Post)
  10. teddyjas (5 Posts)
  11. buergi (2 Posts)
  12. Buzzwords (2 Posts)
  13. tomcheng76 (4 Posts)
  14. kveeiv (1 Post)
  15. dhisnotnull (2 Posts)
  16. walldorff (1 Post)
  17. brizardh (2 Posts)
  18. elizard (1 Post)
  19. Remy (1 Post)
  20. renoye (8 Posts)
  21. despay (1 Post)
  22. lwexler (2 Posts)
  23. tomim (1 Post)
  24. Mjollnir26 (1 Post)
  25. allenlako (3 Posts)
  26. Andrea Gioia (1 Post)
  27. wp.joju (1 Post)
  28. genio (2 Posts)
  29. 828 (1 Post)
  30. ljschrenk (4 Posts)
  31. diablo (3 Posts)
  32. blakel (1 Post)
  33. Grolubao (2 Posts)
  34. makiavelli (2 Posts)
  35. elesel (1 Post)
  36. Capt.JackSparrow (2 Posts)
  37. ferryman (3 Posts)
  38. cwford (1 Post)
  39. 3dm (1 Post)
  40. imnilesh (1 Post)
  41. Rotterdam (2 Posts)
  42. nandubochkar (1 Post)
  43. Dustin Graham (1 Post)
  44. Boing (2 Posts)
  45. tdteti_ (8 Posts)
  46. vtulin (2 Posts)
  47. hello (1 Post)
  48. PranKe01 (2 Posts)
  49. jbusuulwa (6 Posts)
  50. cwilson (1 Post)
  51. ronaldploeger (1 Post)
  52. scblue (1 Post)
  53. saadkhan (2 Posts)
  54. subbugv (6 Posts)
  55. p3p3 (1 Post)
  56. computeraholic (1 Post)
  57. calabacita (3 Posts)
  58. aghextjs (1 Post)
  59. Arindam Das (1 Post)
  60. aw_zahid (1 Post)
  61. deister (1 Post)
  62. billprince (1 Post)
  63. amol.gaikwad (2 Posts)
  64. george4rotech (7 Posts)
  65. leonrenkema (1 Post)
  66. mvassau (1 Post)
  67. aDoF96 (2 Posts)
  68. attack11 (3 Posts)
  69. chakrics (1 Post)
  70. thangamalar (3 Posts)
  71. mayurid (1 Post)
  72. Lobo (1 Post)
  73. christian130 (3 Posts)
  74. elbino (3 Posts)
  75. eashwaranp (1 Post)
  76. atul.sachan@capgemini.com (3 Posts)
  77. Joe Kuan (1 Post)
  78. kent78 (4 Posts)
  79. dsk1962 (1 Post)
  80. Woodlander (3 Posts)
  81. msmolyak (1 Post)
  82. mond (4 Posts)
  83. anandhasubha (1 Post)
  84. David Warren (1 Post)
  85. colinm (2 Posts)
  86. sothea (1 Post)
  87. incanus (1 Post)
  88. MarceloCajr (1 Post)
  89. knackwurst (1 Post)
  90. Pattie (1 Post)
  91. parnold3 (1 Post)
  92. StanimirPanchev (1 Post)
  93. palashkumar1010 (1 Post)
  94. ash4aque (3 Posts)
  95. farfar (3 Posts)
  96. PrashanthShetty (1 Post)
  97. brprashanth (2 Posts)
  98. perseusy (3 Posts)
  99. theWalli (1 Post)
  100. hieu79vn (1 Post)
  101. Hisamitsu (1 Post)
  102. hensor (1 Post)
  103. northmh (3 Posts)
  104. parax (1 Post)
  105. PankajG (1 Post)
  106. reedcat (1 Post)