Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#14986 closed defect (fixed)

An Observable DataStore wrapping an ItemFileWriteStore class is invoking the update method with bad parameters

Reported by: dg Owned by: Kris Zyp
Priority: high Milestone: 1.7.3
Component: Data Version: 1.7.2
Keywords: Cc: cjolif
Blocked By: Blocking:


I have a widget that is displaying a data.

If the store is wrapped in an Observable class, I'm tracking the changes to update my widget.

If I use a ItemFileWriteStore? is wrapped in an observable the update function is not called with the correct parameters when a new data item is added and then updated.

To reproduce launch the attached test case and look at the console. You will notice that the parameters are not the same when using a Memory store.

Attachments (1)

DataStore_TestCase_14986.html (1.7 KB) - added by dg 10 years ago.
Test case to reproduce issue

Download all attachments as: .zip

Change History (9)

Changed 10 years ago by dg

Test case to reproduce issue

comment:1 Changed 10 years ago by cjolif

Cc: cjolfi added
Milestone: tbd1.7.3
Priority: undecidedhigh

This hurting the new dojox/calendar. See:

comment:2 Changed 10 years ago by cjolif

Cc: cjolif added; cjolfi removed

comment:3 Changed 10 years ago by cjolif

This comes from the fact Observable actually really works (i.e. gives you insertion indexes) only when a queryEngine is present on the store. This is very limitating as most actual store implementation are dojo/data and so DataStore is used _very_ often and does not support this.

comment:4 Changed 10 years ago by Kris Zyp

Does the DataStore? work properly when you set the queryEngine to a SimpleQueryEngine?? Just wondering if this can be easily solved by setting this as the default.

comment:5 Changed 10 years ago by cjolif

Kris, I did try and it did work (see calendar bug). That said I find strange to say the less to create a dummy (because it won't be actually used by the store itself) queryEngine to get that working?

comment:6 Changed 10 years ago by Kris Zyp

It is strange because we simply can't (reliably) get any type of query function from the data store, the data store doesn't provide such an API. This is one of the fundamental issues with the old data store, you simply can't determine if an item belongs to a query or not.

comment:7 Changed 10 years ago by Kris Zyp

Resolution: fixed
Status: newclosed

In [28224]:

Default to using the SimpleQueryEngine? for dojo/store/DataStore, fixes #14986 !strict

comment:8 Changed 10 years ago by bill

In [28271]:

For some reason [28224] broke how "dijit" in robot test files points to the dijit in the iframe, thus breaking dijit/tests/tree/robot/Tree_selector.html (and also intermittently the Tree_dnd.html test) on IE8.

Referencing"dijit/registry") instead of dijit. Eventually all these files should be converted to full AMD.

Refs #14929, #14986 !strict.

Note: See TracTickets for help on using tickets.