Opened 7 years ago

Closed 7 years ago

Last modified 6 years ago

#17093 closed defect (fixed)

dojox/mobile/EdgeToEdgeStoreList does not update when using itemMap or labelProperty to map a different field to the label.

Reported by: Ed Chatelain Owned by: Eric Durocher
Priority: undecided Milestone: 1.9.1
Component: DojoX Mobile Version: 1.9.0rc2
Keywords: Cc: cjolif, Adrian Vasiliu
Blocked By: Blocking:

Description

dojox/mobile/EdgeToEdgeStoreList does not update when using itemMap or labelProperty to map a different field to the label.

When using an observable store and updating an item's label the update is shown in the EdgeToEdgeStoreList? if "label" is used, but if an itemMap or labelProperty is used to map a different field to the label then the update is not shown.

I will attach an updated copy of dojox/mobile/tests/test_EdgeToEdgeStoreList-itemMap.html to show the problem. When the "Update" button is pressed for "set2" the 2nd row is updated immediately, because "set2" uses "label", but when "Update" is pressed for "set1" the update will not be seen unless you swap back to "set2" and then back to "set1".

Attachments (3)

test_EdgeToEdgeStoreList-itemMap.html (3.9 KB) - added by Ed Chatelain 7 years ago.
An updated copy of dojox/mobile/tests/test_EdgeToEdgeStoreList-itemMap.html with an "Update" button to show the problem.
test_EdgeToEdgeStoreList-itemMap.2.html (4.0 KB) - added by Sebastien Brunot 7 years ago.
Manual test for this bug fix. (IBM CCLA).
ticket17093.patch (13.8 KB) - added by Sebastien Brunot 7 years ago.
dojox/mobile/EdgeToEdgeStoreList now properly update when using itemMap or labelProperty to map a different field to the label. (IBM CCLA).

Download all attachments as: .zip

Change History (19)

Changed 7 years ago by Ed Chatelain

An updated copy of dojox/mobile/tests/test_EdgeToEdgeStoreList-itemMap.html with an "Update" button to show the problem.

comment:1 Changed 7 years ago by Ed Chatelain

Cc: cjolif added

comment:2 Changed 7 years ago by cjolif

Cc: Adrian Vasiliu added
Milestone: tbd1.9.1

comment:3 Changed 7 years ago by Sebastien Brunot

I've attached a patch that solves the issue (ticket17093.patch).

comment:4 Changed 7 years ago by Ed Chatelain

The fix works for me. Thanks.

comment:5 Changed 7 years ago by Adrian Vasiliu

Tested OK too. Now, I would think we should also include a test case in the product - say a variant of the test currently attached, modified to make it nicer. Unless Ed wants to do it himself, I'll go this way.

Changed 7 years ago by Sebastien Brunot

Manual test for this bug fix. (IBM CCLA).

comment:6 Changed 7 years ago by Sebastien Brunot

I've added a manual test for this feature.

comment:7 Changed 7 years ago by Adrian Vasiliu

@sbrunot, about your variant of Ed's test, I'm not 100% convinced we should add an id attribute to the items, as replacement of the use of idProperty on the Memory store. In my mind we would enrich the existing test with the update feature, as in Ed's original test case, thus we should keep testing/illustrating the idProperty mechanism too, which allows to avoid the overhead of an id attribute as long as there is another field with unique values. That said, we can also add it as yet another new test. Opinions?

comment:8 Changed 7 years ago by Eric Durocher

Not really answering Adrian's point, but why not add a DOH test instead of yet another manual test? It seems typically the kind of things that can be tested automatically...

comment:9 Changed 7 years ago by Adrian Vasiliu

Fully agree. I would say we can have both, since a manual test also has value - easier for users to pick an usage example in the manual tests than in the DOH. Say:

  • I commit sbrunot's lib fix + a manual test case based on Ed's test case that I tend to modify this way: a) the update would hold for all items instead of just updating the second item, and b) instead of appending "Updated" to the label each time the "Update" button is pressed", I would suffix the label with "Update #n" with "n" incremented at each update.
  • When a DOH is ready, it will get added.

Changed 7 years ago by Sebastien Brunot

Attachment: ticket17093.patch added

dojox/mobile/EdgeToEdgeStoreList now properly update when using itemMap or labelProperty to map a different field to the label. (IBM CCLA).

comment:10 Changed 7 years ago by Sebastien Brunot

Patch updated with both a manual and a DOH test.

comment:11 Changed 7 years ago by Adrian Vasiliu

Resolution: fixed
Status: newclosed

In [31444]:

fixes #17093, dojox/mobile/EdgeToEdgeStoreList now properly updates when using itemMap or labelProperty to map a different field to the label. Includes manual and DOH tests. - Thanks Sebastien Brunot (IBM, CCLA).

comment:12 Changed 7 years ago by Adrian Vasiliu

In [31445]:

fixes #17093, dojox/mobile/EdgeToEdgeStoreList now properly updates when using itemMap or labelProperty to map a different field to the label. Includes manual and DOH tests. - Thanks Sebastien Brunot (IBM, CCLA).

comment:13 Changed 7 years ago by Adrian Vasiliu

In [31446]:

refs #17093, fix indentation (indent with tab not blank)

comment:14 Changed 7 years ago by Adrian Vasiliu

In [31447]:

refs #17093, fix indentation (indent with tab not blank)

comment:15 Changed 6 years ago by Adrian Vasiliu <vasiliu@…>

In 65789c540c3d0901aa003c678c581feac119b9ae/dojox:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 

comment:16 Changed 6 years ago by Adrian Vasiliu <vasiliu@…>

In a64e71a620342b5ed7cf33e6527b10138d210a24/dojox:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 
Note: See TracTickets for help on using tickets.