Opened 11 years ago

Closed 10 years ago

#8662 closed defect (fixed)

[patch]Dojo 1.3 beta + dojox.Grid + header Menu

Reported by: Dom Derrien Owned by: Bryan Forbes
Priority: high Milestone: 1.3
Component: DojoX Grid Version: 1.3.0b1
Keywords: Cc: Nathan Toone
Blocked By: Blocking:

Description (last modified by Adam Peller)

In dojox/grid/_Grid.js, around line 600:

_setHeaderMenuAttr: function(menu){
    if(this._placeholders.length){
        dojo.forEach(this._placeholders, function(p){
            p.unReplace(true);
        });
        this._placeholders = [];
    }
    ...

It appears the verification of this._placeholders being not null is missing :( Then the setup of grids which have header menus fails.

I just did a local update with a correct "if" statement and everything seems to work fine... Without this fix, the migration 1.2.3 to 1.3 is not possible for such grids.

_setHeaderMenuAttr: function(menu){
    if('''this._placeholders &&''' this._placeholders.length){
        dojo.forEach(this._placeholders, function(p){
            p.unReplace(true);
        });
        this._placeholders = [];
    }
    ...

I hope this helps. A+, Dom

Change History (4)

comment:1 Changed 11 years ago by Adam Peller

Component: DijitDojoX Grid
Owner: set to Bryan Forbes

comment:2 Changed 10 years ago by Adam Peller

Description: modified (diff)
Milestone: tbd1.3
Priority: normalhigh
Summary: Dojo 1.3 beta + dojox.Grid + header Menu[patch]Dojo 1.3 beta + dojox.Grid + header Menu

trivial patch, alleged 1.3 compatibility issue

comment:3 Changed 10 years ago by Adam Peller

Cc: Nathan Toone added

comment:4 Changed 10 years ago by Nathan Toone

Resolution: fixed
Status: newclosed

Fixed in [17005]

Fixes #8662 - possible null value dereference. Thanks for the find. No CLA needed. !strict

Note: See TracTickets for help on using tickets.