Opened 11 years ago

Closed 11 years ago

#6351 closed defect (wontfix)

_getRowId() in dojox.grid.data.DojoData needs to check for existence of _rowIdentities entry

Reported by: guest Owned by: sorvell
Priority: high Milestone: tbd
Component: DojoX Grid Version: 1.0
Keywords: Cc: sschaer@…
Blocked By: Blocking:

Description

When used with an identiy capable store (eg ItemfileWriteStore?) data.DojoData?._getRowId() causes a 'nullpointer' upon updating items in the store that have not been loaded by the Grid yet.

Cause: data.DojoData?._getRowId() does a:

rowId = this._rowIdentities[this.store.getIdentity(item)].rowId;

without prior checking whether the entry in _rowIdentities already exists. This is not the case if the row has not been populated by the Grid yet.

Fix:

Simply check whether the entry exists in _rowIdenties prior to accessing .rowId.

Something like: rowId = this._rowIdentities[this.store.getIdentity(item)];

if(rowId)

rowId = rowId.rowId;

(Sorry for not providing a patch but 1, its such a simple fix 2, someone with more indepth knowledge of the code and understanding of the internals of data.DojoData? will have to check this anyways.

Regards,

Sebastian

Change History (2)

comment:1 Changed 11 years ago by bill

Milestone: tbd

mark all (open) tickets w/blank milestones to be "tbd"; their milestones need to be set to a version number or to "future"

comment:2 Changed 11 years ago by Bryan Forbes

Resolution: wontfix
Status: newclosed

dojox.grid.data.DojoData? is no longer supported.

Note: See TracTickets for help on using tickets.