[英]IBM worklight WL.JSONStore.QueryPart(). Jsonstore error
[英]WL.JSONStore.init(data_collection) is not working in IBM Worklight 6.0.0 hybrid application
我們試圖使用IBM Worklight開發一個簡單的角度混合應用程序,並且希望在我們的應用程序中使用JSONStore。 根據Worklight文檔,我們在application-descriptor.xml
文件的其他資源下添加了JSONStore,並在代碼中按如下方式創建了簡單集合。
var data_collection = {
people : {
searchFields : {name: 'string', age: 'integer'}
}
};
var promise = WL.JSONStore.init(data_collection).then(function(){
alert("init json store successfully!");
return true;
}).fail(function (errorObject) {
alert("init json store failed!" + errorObject);
return false;
});
return promise;
};
但是此代碼不適用於我們。 WL.JSONStore.init
方法本身失敗。 請在這方面幫助我們。
正如Yoel在評論中提到的那樣,錯誤的唯一證據似乎來自最后的}。
將您的代碼保持原樣並在Android環境中的Worklight 6.2.0.01中進行測試(因為您提到了“ worklight”),從而成功完成了JSONStore初始化。
您需要使用以下內容來編輯您的問題:錯誤消息,在何處進行了測試(環境,設備/仿真器/模擬器),Worklight版本等...如果您想進一步進行此操作。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.