#3347 closed task (fixed)
FilteringSelect: should call getIdentity()
Reported by: | bill | Owned by: | haysmark |
---|---|---|---|
Priority: | high | Milestone: | 0.9beta |
Component: | Dijit - Form | Version: | 0.9 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description (last modified by )
FilteringSelect? should call getIdentity() to get the key for each entry in the drop down list.
Jared has already implemented getIdentity() in JsonItemStore?, so JsonItemStore? should have everything you need. In the unit tests there's a data file that serves as an example of how to specify item labels and item identifiers: http://trac.dojotoolkit.org/browser/dojo/trunk/tests/data/countries.json
Change History (6)
comment:1 Changed 14 years ago by
Description: | modified (diff) |
---|---|
Summary: | FilteringSelect: should call getIdentity() and getLabel() → FilteringSelect: should call getIdentity() |
comment:2 Changed 14 years ago by
Status: | new → assigned |
---|
comment:3 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:4 Changed 14 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Actually what I meant was to remove the keyAttr column and require that the data store specified implement getIdentity() and getItemByIdentity().
Interface to getItemByIdentity() might be changing to an async fetchItemByIdentity() so let's wait for that to settle. Given the current interface to getItemByIdentity(), you need to test for the item being loaded or not, as per Brian's mail:
function fetchItemByIdentity(id, callback){ var item = store.getItemByIdentity(id); if(store.isItemLoaded(item)){ callback.call(item); }else{ store.loadItem({item:item, onItem:callback}); } }
comment:5 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
(In [9228]) Fixes #3347. Proxy commit for haysmark. Removed keyAttr from FilteringSelect? (per bill).
comment:6 Changed 10 years ago by
Component: | Dijit → Dijit - Form |
---|
(In [9101]) Fixes #3347. Proxy commit for haysmark. If you leave keyAttr blank on a FilteringSelect?, it uses the identifer field from the data.