Reputation: 1278
I am upgrading an application from dojo 1.5 to 1.7. This application has several FilteringSelects that are backed by ItemFileReadStores. E.g.,
this.docTypeSel = this.adopt(dijit.form.FilteringSelect, {
name: "docType",
autoComplete: true
}, document.createElement("select"));
this.docTypeSel.placeAt(this.formNode);
var url = dojo.moduleUrl("imed", "DocumentTypes.txt");
this.documentTypeStore = new dojo.data.ItemFileReadStore({ url: url, urlPreventCache: "true" });
this.docTypeSel.store = this.documentTypeStore;
In 1.7, calls to this.docTypeSel.set('value',foo)
fail as they try to call this.store.get(value)
. My understanding is that this is the new dojo/store API. Is there some sort of adapter between the old dojo.data API's and the new dojo/store API? If not, what is the recommended replacement for ItemFileReadStore. dojo/store/Memory seems close, but it does not appear to have a way pull the data from an url.
Upvotes: 1
Views: 319
Reputation: 7852
Have you looked at using the dojo/store/DataStore? I haven't used it personally but it appears to be what you want to use since the dijit/form/FilteringSelect
is looks for stores using the dojo/store
API.
On the other hand the dijit/form/Select expects a dojo/data
implementation. If you had a dojo/store
implementation you wanted to use with dijit/form/Select
you would use dojo/data/ObjectStore.
Upvotes: 2