如何在FilteringSelect框中刷新Dojo ItemFileReadStore

时间:2012-09-28 14:52:57

标签: select dojo refresh store

我希望能够强制刷新此Dojo ItemFileReadStore。我有什么想法吗?

            existingCasesStore = new dojo.data.ItemFileReadStore({ url: "some url here" });
            existingCasesStore.fetch();

            // Creates the Choose Existing list box
            new dojo.form.FilteringSelect({
                store: existingCasesStore,
                autocomplete: true,
                maxHeight: "300",
                required: false,
                id: "choose_existing_select_id",
                onChange: function(selected) {
                    utils.setStatusMessage("case_info_status", "", " ");
                }
            }, "choose_existing_select_id");

2 个答案:

答案 0 :(得分:2)

答案 1 :(得分:2)

mschr,

感谢您的提示..这就是我所做的工作。

existingCasesStore.close();
existingCasesStore = new dojo.data.ItemFileReadStore({ data: testData });
existingCasesStore.fetch();
dijit.byId('choose_existing_select_id').set("store", existingCasesStore);