I am trying to implement a filteringselect(dojo)
I am trying to get the values from a memory store. I am able to see the filteringselect
on my page but it is not returning any thing and firebug keeps saying that store.fetch is not a function
Below is the code snippet. Any clues?
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");
Regards.
I am trying to implement a filteringselect(dojo)
I am trying to get the values from a memory store. I am able to see the filteringselect
on my page but it is not returning any thing and firebug keeps saying that store.fetch is not a function
Below is the code snippet. Any clues?
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");
Regards.
Share Improve this question edited Mar 22, 2012 at 9:22 Neysor 3,90511 gold badges36 silver badges66 bronze badges asked Mar 21, 2012 at 14:28 NewbieNewbie 3612 gold badges15 silver badges34 bronze badges2 Answers
Reset to default 5dojo.store.Memory uses the new store API, while FilteringSelect is trying to access it with the old API (fetch).
You can try to use the dojo.store.DataStore adapter in order to pass a new style store to something that expects the old interface.
new dijit.form.FilteringSelect({
//...
store: dojo.store.DataStore(store1)
});
store:dojo.data.ObjectStore({ objectStore:store1})
this worked for me..
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745508374a4630658.html
评论列表(0条)