Opened 6 years ago

Closed 6 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)

test_EdgeToEdgeStoreList-put.html (3.8 KB) - added by Eric Durocher 6 years ago.
Test case for _StoreMixin support for put() operation - Eric Durocher (IBM, CCLA)
16643.patch (8.9 KB) - added by Eric Durocher 6 years ago.
Support store.put() in Dojo Mobile store lists + remove promise handlers - Eric Durocher (IBM, CCLA)

Download all attachments as: .zip

Change History (9)

Changed 6 years ago by Eric Durocher

Test case for _StoreMixin support for put() operation - Eric Durocher (IBM, CCLA)

comment:1 Changed 6 years ago by Eric Durocher

Summary: dojox/mobile/_StoreMixin does not handle updates correctlydojox/mobile/_StoreMixin does not support put() operations
Type: defectenhancement

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 6 years ago by Eric Durocher

Cc: dg added

Changed 6 years ago by Eric Durocher

Attachment: 16643.patch added

Support store.put() in Dojo Mobile store lists + remove promise handlers - Eric Durocher (IBM, CCLA)

comment:3 Changed 6 years ago by Eric Durocher

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 6 years ago by cjolif

Milestone: tbd1.9

comment:5 Changed 6 years ago by cjolif

In [30581]:

fixes #16651. refs #16643. Fixes on store management + add support for put operation. Thanks Eric Durocher (IBM, CCLA).

comment:6 Changed 6 years ago by cjolif

Will be closed once documented.

comment:7 Changed 6 years ago by Eric Durocher

Resolution: fixed
Status: newclosed

Documented in the release notes.

Note: See TracTickets for help on using tickets.