Opened 13 years ago
Closed 12 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: | [email protected]… | |
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 13 years ago by
Milestone: | → tbd |
---|
comment:2 Changed 12 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
dojox.grid.data.DojoData? is no longer supported.
mark all (open) tickets w/blank milestones to be "tbd"; their milestones need to be set to a version number or to "future"