【问题标题】:WL.JSONStore is undefined error in IBM mobilefirstWL.JSONStore 是 IBM mobilefirst 中的未定义错误
【发布时间】:2018-04-07 20:51:15
【问题描述】:

当我尝试在我的移动应用程序中使用 JSONStore 时,我在移动浏览器模拟器中遇到 WL.JSONStore is undefined 错误。我使用的是 IBM mobilefirst(版本 8.0.0-2017091111)。

function wlCommonInit(){

WL.JSONStore.init(collections, options).then(function () {
     alert("intialized successfully");

    }).fail(function (errorObject) {
        alert("failed to initialize collection\n"+ JSON.stringify(errorObject));
    });   

document.getElementById("btn_submit").addEventListener("click", onSubmit, false);

}

function onSubmit(){
var collectionName="people";
var data={firstName:$('#first').val(),middleName:$('#middle').val(),lastName:$('#last').val()};
WL.JSONStore.get(collectionName).add(data, options).then(function () {
   alert("added data successfully");
}).fail(function (error) {

});
}

【问题讨论】:

标签: ibm-mobilefirst jsonstore


【解决方案1】:

【讨论】:

  • 我已经按照上面的链接,但它在 Android 平台上不起作用它显示 WL.JsonStore 没有初始化
【解决方案2】:

您能否指定您的应用正在使用哪个版本的“cordova-plugin-mfp-jsonstore”(运行命令“cordova plugin ls”)。

您是否按照本教程进行操作 Link

【讨论】:

    猜你喜欢
    • 2015-06-23
    • 1970-01-01
    • 1970-01-01
    • 2016-04-01
    • 2016-06-16
    • 1970-01-01
    • 2023-03-09
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多