jsonstore

IBM Worklight 6.1 JsonStore issue on Android 4.4

…衆ロ難τιáo~ 提交于 2020-01-25 00:10:28
问题 I have upgraded to Worklight 6.1 & I was with expectation that the issue I mentioned here IBM Worklight Android 4.4 issue, JSON Store stopped working would be resolved and my app should work fine now. But still facing the JSONStore initialization issue in Android 4.4. Please check below log. 12-10 14:58:30.630: D/dalvikvm(14826): No JNI_OnLoad found in /data/app-lib/com.Test-2/libsqlcipher_android.so 0x41e371b0, skipping init 12-10 14:58:30.630: D/dalvikvm(14826): Trying to load lib /data/app

Where can I find a list of Worklight Error Codes

亡梦爱人 提交于 2020-01-06 02:16:09
问题 Where can I find a list of the possible error codes for the various sections of Worklight? Specifically, when I'm calling WL.JSONStore.findAll() my onFailure callback is being called and the error code is -50. I can't find this number anywhere in the code nor in the Worklight documentation, or on the web so far. I've seen references to worklight.js having it, but it is not there. Ditto for WLResponse.h and WLFailResponse.h. 回答1: The list of error codes is in the JSONStore Documentation.

Change HTTP URL in Worklight adapter

夙愿已清 提交于 2019-12-25 03:58:31
问题 I need to create an HTTP adapter for worklight but the url must be programmatically provided via a parameter. 1) I was able to pass the user/password but not the url. Is there a way to do that? I also try to create my own java adapter to call the REST API, It works when I test the adapter but it seems my response is not in the expected format for worklight. I got this error: 2) BAD_PARAMETER_EXPECTED_DOCUMENT_OR_ARRAY_OF_DOCUMENT. my Java adapter returns a JSONArtifact (JSONObject) but it

How to avoid duplicate entries in IBM JSONStore

允我心安 提交于 2019-12-25 01:46:17
问题 WL.JSONStore.get(collectionName).change(data, options) method does not seem to work for duplicate values. I get duplicate values entered whenever data is loaded through the adapter. Below is the code that I have used to avoid duplicate entries. init(){ console.log('JSONStore init function callled'); let collections = { activities: { searchField: {serialKey: 'string'}, adapter: { name: 'ServiceAdapter', add: 'pushActivities', remove: 'removeActivity', replace: 'replaceActivity', load: {

Worklight v6: use multiple JSON stores concurrently in app

陌路散爱 提交于 2019-12-24 15:31:22
问题 Is it possible to use two or more JSON stores in a Worklight app at the same time (without switching back and forth)? When I initialize a second JSON store with a username/password, collections in the "default" JSON store that were initialized properly become inaccessible. Given that many functions in the JSON store api does not let you specify a target store, I am guessing that using multiple stores concurrently is not possible. If this is true, then how does one address the use case where

IBM Worklight 6.2 - error on StoragePlugin

ⅰ亾dé卋堺 提交于 2019-12-23 18:18:56
问题 I upgraded from Worklight 6.1.0.1 to 6.2 and since then, my app stopped loading JSONStore successfully. It says it can't find the class StoragePlugin, although the class is actually there in the worklight-android.jar It is also declared in the config.xml file: <feature name="StoragePlugin"> <param name="android-package" value="com.worklight.androidgap.plugin.storage.StoragePlugin"/> </feature> That's the logcat output when I run it on a android device: 07-01 20:58:48.851: D/NONE(4379):

Where is the data recorded in JsonStore?

五迷三道 提交于 2019-12-23 03:15:28
问题 I downloaded from Getting Started, JSONStore example Project has been successfully loaded into the browser and on a real device, but I can not understand where the input data is stored, what file? Eclipse + IBM Worklight + JSONStore. 回答1: Android: /data/data/com.[app-name]/databases/wljsonstore (source) iOS Simulator: ~/Library/Application Support/iPhone Simulator/6.1/Applications/[id]/Documents/wljsonstore (source) Browser: LocalStorage 来源: https://stackoverflow.com/questions/22427668/where

How to properly initialize the JSON store in Worklight 6.1

依然范特西╮ 提交于 2019-12-13 03:57:55
问题 I am attempting to initalize the IBM Worklight JSON store as below: //JSONStore jsonStoreCollection metadata var jsonStoreCollection = {}; //JSONStore jsonStoreCollection metadata var COLLECTION_NAME = 'people'; function wlCommonInit(){ // Create empty options to pass to // the WL.JSONStore.init function var options = {}; //Define the collection and list the search fields jsonStoreCollection[COLLECTION_NAME] = { searchFields : {name: 'string'}, }; //Initialize the JSON store collection WL

JSONStore Worklight - Size Limit

荒凉一梦 提交于 2019-12-12 11:18:25
问题 JSONStore provides us with a great way to sync data with a server and track changes a user makes while offline. Is there a limit as to how much information could be saved on JSONStore? I found that Webkit database has a limit of 5 MB where as SQLLite database has no limit. Also wondering where JSONStore uses WebKit database or SQLLite to store its underlying information 回答1: JSONStore ultimately stores information on the file system. The only bounds would be the space remaining on the device

worklight 5.0.6 JsonRestStore, use of Promises

旧时模样 提交于 2019-12-12 02:54:43
问题 This was originally a question about the Worklight documentation, it transpires that my real question is about JQuery's Deferred/Promise API and the promise.then() function. Context: The documentation for the 5.0.6 JsonRestStore API gives examples of using the new Promise capability offering two possible formulations. someFunction.then( successCallback, errorCallback, optionalProgressCallback); And someFunction().then(successCallback).fail(errorCallback) These two approaches seem, as comments