Opened 13 years ago

Closed 12 years ago

Last modified 12 years ago

#8312 closed defect (fixed) fails with non-Array data

Reported by: Ozzi Lee Owned by: Dustin Machi
Priority: high Milestone: 1.4
Component: DojoX Data Version: 1.2.3
Keywords: Cc:
Blocked By: Blocking:


Creating a with an Object instead of an Array causes buildIndex to incorrectly index the data.

The conditional:

if (!dojo.isArray(data[i])) {

on line 212 (rev 15617) needs to be duplicated in the else branch so that a reference is not added for arrays at the root of the Object.

Without this fix, removing rows from the data store will not work.

The workaround is to use a one-element array [object] as the data, rather than object itself.

Change History (5)

comment:1 Changed 13 years ago by Jared Jurkiewicz

Owner: changed from Jared Jurkiewicz to Kris Zyp

comment:2 Changed 13 years ago by Kris Zyp

Owner: changed from Kris Zyp to Dustin Machi

comment:3 Changed 13 years ago by dante

Milestone: tbdfuture

comment:4 Changed 12 years ago by Dustin Machi

Resolution: fixed
Status: newclosed

(In [20831]) jsonPathStore is out of sync due to the more advanced dojox.json capabilities. To avoid confusion with these, I'm removing this widget as I dont' plan to support it going forward. There is an equivalent widget which uses dojox.json ref and query in dojoc/dmachi/data called JsonStore? for those who still need this capability. While they are not drop in replacements of each other, they are pretty close and it should not take a significant amount of time to convert, and the benefits gained in performance and querying flexibility are worth it. closes #7473 closes #8175 closes #7331 closes #7403 closes #8312 closes #8334 closes #9976 closes #10290

comment:5 Changed 12 years ago by bill

Milestone: future1.4
Note: See TracTickets for help on using tickets.