#12295 closed defect (fixed)
Select: _addOptionForItem() in dijit.form._FormSelectWidget uses wrong callback in store.loadItem()
Reported by: | Adam Gould | Owned by: | Douglas Hays |
---|---|---|---|
Priority: | high | Milestone: | 1.7 |
Component: | Dijit - Form | Version: | 1.5 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
When calling store.loadItem(), _addOptionForItem is passing an "onComplete" callback. This callback doesn't exist for loadItem(). It should be "onItem".
Attachments (1)
Change History (7)
Changed 10 years ago by
Attachment: | _FormSelectWidget.js.patch added |
---|
comment:1 Changed 10 years ago by
Component: | General → Dijit |
---|---|
Owner: | changed from anonymous to Douglas Hays |
Summary: | _addOptionForItem() in dijit.form._FormSelectWidget uses wrong callback in store.loadItem() → Select: _addOptionForItem() in dijit.form._FormSelectWidget uses wrong callback in store.loadItem() |
Sounds like we are also missing a unit test for that method (or rather, the public API that uses that method).
comment:2 Changed 10 years ago by
Milestone: | tbd → 1.7 |
---|
comment:3 Changed 10 years ago by
Component: | Dijit → Dijit - Form |
---|
comment:4 Changed 10 years ago by
Clearly it should be onItem, but how do I trigger the if(!store.isItemLoaded(item)) code path in an automated test?
comment:5 Changed 10 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:6 Changed 10 years ago by
You can see some examples where isItemLoaded(item) returns false in tests/tree/node1.1. It contains "partially loaded" items, ex::
{ $ref: 'node1.1.1', name: 'node1.1.1'}
(node1.1 is a data file for JsonRestStore, not ItemFileReadStore.)
Maybe it's not worth testing though, the idea of partially loaded items goes away with the new dojo.store API.
Patch against 1.5 to substitute the correct callback