ibm-mobilefirst

Worklight logout does not clear active user

一曲冷凌霜 提交于 2019-12-18 17:26:05
问题 I am using Worklight 6.1 and am using a challange handler to determine if my user is logged or not. Once logged in, I have the following code attached to my logout button in my app: on(logoutBtn, "click", lang.hitch(this, function() { WL.Client.logout('AdapterAuthRealm', { onSuccess:lang.hitch(this, function() { this.gotoView("login"); }), onFailure:lang.hitch(this, function() { WL.Logger.error("Unable to logout"); })}); return false; })); Clicking it opens the login view, but when the user

Worklight build error Failed initializing ClientProjectBuilder

≡放荡痞女 提交于 2019-12-18 13:30:25
问题 I have suddenly started getting worklight build errors like below. I have no clue why it started happening suddenly. The code was working fine until the remote machine I use for Xcode builds was rebooted. Any clue what could be causing it ? ipad build failed: Failed initializing ClientProjectBuilder android build failed: Failed initializing ClientProjectBuilder iphone build failed: Failed initializing ClientProjectBuilder Regards Avi 回答1: The solution to this error, typically, is to delete

How to auto-scroll to input field in Android when the soft keyboard overlaps them on showing?

旧城冷巷雨未停 提交于 2019-12-18 13:16:07
问题 I am developing a hybrid app using Worklight, and I am experiencing the following issue: When the user clicks on an input field, the soft keyboard that pops up hides the input field when the latter is relatively low on the screen. The page is scrollable, so the user can scroll and see the field again, but the customer requirements define that the page will auto-scroll until the field is visible. Please note that this happens only in the Android environment. In the iPhone and iPad environments

IBM Worklight 6.0 - scriptError in dojo.js:21

和自甴很熟 提交于 2019-12-18 09:49:41
问题 I have created a simple application using the bundled Dojo v1.9 and upon running it device or emulator, I am getting the following error: 07-08 05:38:17.429: E/Web Console(530): Error: scriptError at file:///data/data/com.WorklightApp/files/www/default/dojo/dojo.js:21 These are the steps that I took: Create a Worklight project and application (with Dojo) Add a simple dojo tag on the main page Add the Android environment Build All and Deploy Run on device and/or emulator The dojo components

MobileFirst v8 and bootstrap Angular JS v1.5.3 error

℡╲_俬逩灬. 提交于 2019-12-18 09:40:02
问题 I have a Cordova application that uses MobileFirst Platform version 8, Ionic version 1.3.1 and AngularJS version 1.5.3. When I run it and bootstrap Angular JS so that the app connects to the MobileFirst Platform first I get the following error: Error in Success callbackId: WLAuthorizationManagerPlugin561212842 : Error: [$injector:modulerr] Failed to instantiate module ng due to: TypeError: Cannot set property 'aHrefSanitizationWhitelist' of null at $$SanitizeUriProvider (file:///android_asset

How to retrieve images from existing database using sql/http adapter from worklight application

巧了我就是萌 提交于 2019-12-18 09:37:14
问题 I'm having an existing database and i have to show the list of images in my worklight application to user so that they can select and adds to cart. The image column in database is having only path of images at server. i.e "memory/toppings/nuts/hazelnuts.jpg" "memory/toppings/nuts/macadamia_nuts.jpg" so how to get all these images and show on my worklight application. 回答1: What you should do is concatenate the server URL and the image path after you retrieve it from the database. Lets say in

IBM Worklight - “Unfortunately, HelloWorkLight has stopped” error message

北城余情 提交于 2019-12-18 09:37:08
问题 I have created a simple HelloWorld application with the Android environment. When I run it in my android device (ICS version) i get this error message: Unfortunately, HelloWorkLight has stopped When I run it in the Android emulator (version 2.2), I get this error: Sorry! The application HelloWorkLight (process com.HelloWorkLight) has stopped unexpectedly. Please try again. Force Close. I have no idea what to do with this error. 回答1: You are probably using ADT v22. To resolve this issue: Right

IBM Worklight : WL.Client.getUserName Fails to retrieve userIdentity immediately after authentication

▼魔方 西西 提交于 2019-12-18 07:23:19
问题 I have done adapter based authentication and there is no problem in authentication and it works fine. I have faced some issues in getting the active users useridentity.The code may explain you a bit more adapterAuthRealmChallengeHandler.handleChallenge = function(response){ var authRequired = response.responseJSON.authRequired; if (authRequired == true){ if (response.responseJSON.errorMessage) alert(response.responseJSON.errorMessage); } else if (authRequired == false){

Worklight Push notification (APNS) fails with javax.net.ssl.SSLHandshakeException

天涯浪子 提交于 2019-12-18 07:10:07
问题 I have a Worklight 6.1 app on iOS with push notifications. It works fine, until something goes wrong on the Worklight server. All push notifications after that fail until the server is restarted. The Worklight server is Liberty 8.5.5.0 on Linux x86_64 Using JDK : java-1.7.0-ibm-1.7.0.5.0.x86_64 The Worklight database is Derby (this is a test server) Everything works great when I start the server. 10 minutes after the server starts, I see: [2/20/14 19:39:15:319 CST] 0000003e com.notnoop.apns

Worklight: WL.Server.setActiveUser - Can't modify - Illegal State: Cannot change identity

回眸只為那壹抹淺笑 提交于 2019-12-18 07:07:13
问题 I am trying to modify the logged in user identity, var mydata="this is custom data array"; var user = JSON.parse(JSON.stringify(WL.Server.getActiveUser())); WL.Logger.debug("Before Update" + user.attributes); WL.Logger.debug(" displayName =" + user.displayName ); WL.Logger.debug("isUserAuthenticated ="+ user.isUserAuthenticated ); WL.Logger.debug("userId =" + user.userId ); WL.Server.setActiveUser ("myAppRealm" ,{ userId: user.userId , displayName: user.displayName, isUserAuthenticated: user