【问题标题】:Facing issue in using Worklight JSON Store使用 Worklight JSON Store 时面临的问题
【发布时间】:2013-07-18 16:50:39
【问题描述】:

我是 Worklight Studio 的新手,正在尝试使用 JSON Store。面对错误信息

Uncaught TypeError: Object # has no method 'exec'

var globalPID = [ {
    "start_date" : "\/Date(1341212400000-0700)\/",
    "PID" : "96052",
    "project_name" : "Copy and Print Microsite Implementation"      
}]; 

var searchFields = { PID: 'integer', project_name: 'string' };
var addSearchFields = { Probability : 'integer' };
var options = {onSuccess: win, onFailure: fail};
var pidCollection = WL.JSONStore.initCollection('globalPIDs', searchFields, options);
pidCollection.store(globalPID,options);

LogCat 中的消息:

07-19 17:05:32.918: D/CordovaWebView(541): >>> loadUrl(file:///data/data/com.PivMobileNew/files/www/default/PivMobileNew.html)
07-19 17:05:32.928: D/CordovaWebView(541): >>> loadUrlNow()
07-19 17:05:32.973: D/DroidGap(541): onMessage(onPageStarted,file:///data/data/com.PivMobileNew/files/www/default/PivMobileNew.html)
07-19 17:05:34.348: D/DroidGap(541): onMessage(spinner,stop)
07-19 17:05:41.668: D/CordovaLog(541): Uncaught TypeError: Object #<Object> has no method 'exec'
07-19 17:05:41.668: D/CordovaLog(541): file:///data/data/com.PivMobileNew/files/www/default/wlclient/js/jsonstore/jsonstore.js: Line 525 : Uncaught TypeError: Object #<Object> has no method 'exec'
07-19 17:05:41.688: E/Web Console(541): Uncaught TypeError: Object #<Object> has no method 'exec' at file:///data/data/com.PivMobileNew/files/www/default/wlclient/js/jsonstore/jsonstore.js:525
07-19 17:05:44.998: E/libEGL(541): call to OpenGL ES API with no current context (logged once per thread)
07-19 17:05:44.998: D/ShaderProgram(541): couldn't load the vertex shader!
07-19 17:05:44.998: E/libEGL(541): call to OpenGL ES API with no current context (logged once per thread)
07-19 17:05:44.998: D/ShaderProgram(541): couldn't load the vertex shader!
07-19 17:05:44.998: E/libEGL(541): call to OpenGL ES API with no current context (logged once per thread)
07-19 17:05:44.998: D/ShaderProgram(541): couldn't load the vertex shader!
07-19 17:05:44.998: E/libEGL(541): call to OpenGL ES API with no current context (logged once per thread)
07-19 17:05:44.998: D/ShaderProgram(541): couldn't load the vertex shader!
07-19 17:05:44.998: E/libEGL(541): call to OpenGL ES API with no current context (logged once per thread)
07-19 17:05:44.998: D/ShaderProgram(541): couldn't load the vertex shader!
07-19 17:05:45.098: D/Cordova(541): onPageFinished(file:///data/data/com.PivMobileNew/files/www/default/PivMobileNew.html)
07-19 17:05:45.118: D/DroidGap(541): onMessage(onNativeReady,null)
07-19 17:05:45.118: D/DroidGap(541): onMessage(onPageFinished,file:///data/data/com.PivMobileNew/files/www/default/PivMobileNew.html)
07-19 17:05:45.148: D/CordovaLog(541): Uncaught TypeError: Object #<Object> has no method 'exec'
07-19 17:05:45.148: D/CordovaLog(541): file:///data/data/com.PivMobileNew/files/www/default/wlclient/js/jsonstore/jsonstore.js: Line 525 : Uncaught TypeError: Object #<Object> has no method 'exec'
07-19 17:05:45.148: E/Web Console(541): Uncaught TypeError: Object #<Object> has no method 'exec' at file:///data/data/com.PivMobileNew/files/www/default/wlclient/js/jsonstore/jsonstore.js:525

【问题讨论】:

    标签: ibm-mobilefirst jsonstore


    【解决方案1】:

    在 Cordova 准备就绪后调用 JSONStore 代码(在 wlCommonInit 内部或之后执行)。

    【讨论】:

      猜你喜欢
      • 2013-05-09
      • 1970-01-01
      • 1970-01-01
      • 2021-11-21
      • 2012-09-09
      • 2013-05-23
      • 2020-12-07
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多