在Dojo 1.7+;中;,FilteringSelect似乎不再适用于ItemFileReadStore
我正在将一个应用程序从Dojo1.5升级到1.7。此应用程序有多个FilteringSelects,这些FilteringSelects由ItemFileReadStores支持。例如:在Dojo 1.7+;中;,FilteringSelect似乎不再适用于ItemFileReadStore,dojo,Dojo,我正在将一个应用程序从Dojo1.5升级到1.7。此应用程序有多个FilteringSelects,这些FilteringSelects由ItemFileReadStores支持。例如: this.docTypeSel = this.adopt(dijit.form.FilteringSelect, { name: "docType", autoComplete: true }, document.createElement("select")); thi
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;
在1.7中,调用
this.docTypeSel.set('value',foo)
失败,因为它们试图调用this.store.get(value)
。我的理解是,这是新的dojo/StoreAPI。旧的dojo.data API和新的dojo/store API之间是否存在某种适配器?如果没有,建议用什么替换ItemFileReadStore。dojo/store/Memory似乎很接近,但它似乎没有办法从url中提取数据 您有没有考虑过使用?我没有亲自使用过它,但它似乎是您想要使用的,因为dijit/form/FilteringSelect
是使用dojo/store
API查找商店的
另一方面,dijit/form/Select需要
dojo/data
实现。如果您有一个dojo/store
实现,您希望与dijit/form/Select
一起使用。谢谢!这正是我所需要的。