Opened 8 years ago

Closed 7 years ago

#14732 closed defect (patchwelcome)

dojox.grid.EnhancedGrid + Pagination -- Stack overflow error in IE8

Reported by: Seba Owned by: Evan
Priority: undecided Milestone: tbd
Component: DojoX Grid Version: 1.7.1
Keywords: Cc:
Blocked By: Blocking:

Description

When using dojox.grid.EnhancedGrid? + Pagination plugin + dojox.data.QueryReadStore? I get Stack overflow errors in IE8 after clicking one of the bottom links (pageSizes, pageStepper, gotoButton).

There are no errors when other stores are used.

I will try tu submit 2 files so this error can be reproduced. First one is a modified test file dojox/grid/tests/enchanced/test_enhanced_grid_pagination.html The second one is a test JSON data source for the QueryReadStore?.

My configuration:

OS: Windows XP SP3 HomeEdition? IE: IE 8.0.6001.18702 (The same happens under IE7)

Attachments (5)

qrssource.php (454 bytes) - added by Seba 8 years ago.
test_enhanced_grid_pagination.html (4.8 KB) - added by Seba 8 years ago.
14732.jpg (121.9 KB) - added by Evan 8 years ago.
working well for me in IE7+
datagrid-error-ie7.png (56.6 KB) - added by Seba 8 years ago.
Error under my IE7
datagrid-error-ie8.png (53.3 KB) - added by Seba 8 years ago.
Error under my IE8

Download all attachments as: .zip

Change History (16)

Changed 8 years ago by Seba

Attachment: qrssource.php added

Changed 8 years ago by Seba

comment:1 Changed 8 years ago by Seba

I see no errors under FF3+, Chrome 16, Opera 11.61

comment:2 Changed 8 years ago by Seba

The same error happens under IE9: 9.0.8112.16421

Last edited 8 years ago by Seba (previous) (diff)

comment:3 Changed 8 years ago by Evan

Working well for me on IE7+, when clicked on any links in the pagination bar, EDG works normally as the snapshot shown. Anything I missed?

Changed 8 years ago by Evan

Attachment: 14732.jpg added

working well for me in IE7+

Changed 8 years ago by Seba

Attachment: datagrid-error-ie7.png added

Error under my IE7

Changed 8 years ago by Seba

Attachment: datagrid-error-ie8.png added

Error under my IE8

comment:4 Changed 8 years ago by Seba

Well I tested it on 2 different computers under IE7,8,9 and see the same error. This is just a popup message saying "Stack overflow at line 1". after closing the popup each action is completed correctly (pageSizes, pageStepper, gotoButton).

Please check your error console maybe there is something there :)

ps I have couple of IE versions installed on 1 machine. Maybe this couses errors ? I'm using Utilu IE Collection -> http://utilu.com/IECollection/

Last edited 8 years ago by Seba (previous) (diff)

comment:5 Changed 8 years ago by Seba

Tested it on another machine without Utilu IE Collection and I see the same error but visible only inside script console. Probably Your IE doesn't display this error inside popup dialog.

Last edited 8 years ago by Seba (previous) (diff)

comment:6 Changed 8 years ago by techie

Tested with Dojo 1.7.x, IE 8, "Out of stack space". While testing with debugger, following line(in dojo.js) has issue

return _384[_385].apply(_384,arguments
[])

Also tested with Firefox 10.0.1(firebug enabled), crashes it completely.

Sample piece of code for enabling pagination in Grid

grid = new dojox.grid.EnhancedGrid?({

id: 'grid', store: store, editable: true, rowsPerPage: 20, structure: layout, plugins: {

pagination: {

description: true, sizeSwitch: true,

pageStepper: true, gotoButton: true, maxPageStep: 4, position: "bottom"

}

}}, document.createElement('div'));

comment:7 Changed 8 years ago by camts

With a project specific Store, I have the same error.
I have found it is an infinite loop on Pagination.js line 287 : "_this._originalResize();" that calls itself (line 284 : "g.resize = ...").
Commenting lines 284 to 288 solves the problem in my case, and grid still resizes correctly. Is this "resize" method redefinition really useful ?

comment:8 in reply to:  7 Changed 8 years ago by kamalsomani

this solution works for me. but is it the right way ?

comment:9 Changed 8 years ago by fsk310

in Pagination.js

285 near line Replacement for

postCreate: function(){
    this.inherited(arguments);
    var _this = this, g = this.grid;
    this.plugin.connect(g, "_resize", function(){
      _this._resetGridHeight();
    });
    this._originalResize = function(){
      g._resize();
    };
    g.resize = function(changeSize, resultSize){
      _this._changeSize = changeSize;
      _this._resultSize = resultSize;
      _this._originalResize();
    };
    this.focus = _Focus(this);
    this._placeSelf();
  },
Last edited 8 years ago by fsk310 (previous) (diff)

comment:10 Changed 7 years ago by bill

DojoX Grid and EnhancedGrid are deprecated in favor of dgrid and gridx.

You should upgrade your code to use one of those two grids.

We will consider patches to the old DojoX Grid code though.

comment:11 Changed 7 years ago by bill

Resolution: patchwelcome
Status: newclosed
Note: See TracTickets for help on using tickets.