我试图删除存储在JSONStore中的值。我正面临这个错误:
03-26 18:52:10.391: I/chromium(1890): [INFO:CONSOLE(0)] "document.clear() is deprecated. This method doesn't do anything.", source: (0)
并且不会删除该值。
以下是代码:
function clear() {
var collectionName = 'people';
//Build the query object
var query = {
_id: 3
};
var options = {
exact: true
};
try {
WL.JSONStore.get(collectionName).remove(query, options)
.then(function(res) {
alert("Success" + res);
})
.fail(function(errorObject) {
alert(errorObject.msg);
});
} catch (e) {
_logError("");
}
}
我真的很感激帮助。感谢。
答案 0 :(得分:0)
好吧,出现此错误的原因是您设置了清除功能,但moiblefist(worklight)具有此类型的API clear,所以我认为这是一个错误。你应该使用另一个名称,而不是moiblefist API方法。
或尝试使用http://www-01.ibm.com/support/docview.wss?uid=swg2C7000003#71
中的最新版本