javascript - store.fetch is not a function (dojo) - Stack Overflow

I am trying to implement a filteringselect(dojo) I am trying to get the values from a memory store. I a

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 badges
Add a ment  | 

2 Answers 2

Reset to default 5

dojo.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

相关推荐

  • javascript - store.fetch is not a function (dojo) - Stack Overflow

    I am trying to implement a filteringselect(dojo) I am trying to get the values from a memory store. I a

    5小时前
    40

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信