Opened 9 years ago
Closed 9 years ago
#16643 closed enhancement (fixed)
dojox/mobile/_StoreMixin does not support put() operations
Reported by: | Eric Durocher | Owned by: | Eric Durocher |
---|---|---|---|
Priority: | undecided | Milestone: | 1.9 |
Component: | DojoX Mobile | Version: | 1.8.3 |
Keywords: | Cc: | dg | |
Blocked By: | Blocking: |
Description
Updating an existing item in a store connected to a Dojo Mobile store-enabled widget does not work. The logic of the Observable listener in dojox/mobile/_StoreMixin.refresh is wrong: when an item of the store is updated, the removedFrom index is positive (and equal to the insertedTo index), but the current code calls onDelete.
Attachments (2)
Change History (9)
Changed 9 years ago by
Attachment: | test_EdgeToEdgeStoreList-put.html added |
---|
comment:1 Changed 9 years ago by
Summary: | dojox/mobile/_StoreMixin does not handle updates correctly → dojox/mobile/_StoreMixin does not support put() operations |
---|---|
Type: | defect → enhancement |
Changing type to enhancement and updating the description, since there is no real bug: put() operations are just ignored with the current code (since the includeObjectUpdates argument to observe is undefined, updates will just never be notified).
comment:2 Changed 9 years ago by
Cc: | dg added |
---|
Changed 9 years ago by
Attachment: | 16643.patch added |
---|
Support store.put() in Dojo Mobile store lists + remove promise handlers - Eric Durocher (IBM, CCLA)
comment:3 Changed 9 years ago by
The patch defines a new onAdd method to better differentiate add and put operations, and allow adding items other than at the end of the store. For compatibility with potential custom widgets written for Dojo 1.8, if onAdd is not defined, onUpdate is called instead.
The patch also fixes #16651.
comment:4 Changed 9 years ago by
Milestone: | tbd → 1.9 |
---|
comment:7 Changed 9 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Documented in the release notes.
Test case for _StoreMixin support for put() operation - Eric Durocher (IBM, CCLA)