New*_*bie 3 javascript dojo dijit.form
我正在尝试实现一个filteringselect(dojo)我试图从内存存储中获取值.我能够filteringselect在我的页面上看到它,但它没有返回任何东西,而且firebug一直这么说store.fetch is not a function
以下是代码段.有线索吗?
store1 = new dojo.store.Memory({data: fArr});
var f1 = new dijit.form.FilteringSelect({
name: "Ans",
searchAttr: "No",
placeHolder: "Select",
store: store1
}, "filteringSelect");
f1 .placeAt("s1");
Run Code Online (Sandbox Code Playgroud)
问候.
dojo.store.Memory使用新的商店API,而FilteringSelect正试图使用旧的API(fetch)访问它.
您可以尝试使用dojo.store.DataStore适配器,以便将新样式存储传递给需要旧接口的东西.
new dijit.form.FilteringSelect({
//...
store: dojo.store.DataStore(store1)
});
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2857 次 |
| 最近记录: |