ibm-mobilefirst

IBM Worklight - How can I execute JavaScript code before updating the application?

我们两清 提交于 2019-12-11 12:51:50
问题 When a new software update is available, if user has data stored in jsonstore I need to allow user to commit them to the server before applying the software update, so his/her uncommited updates don't get lost. Currently user is unable to use the application until the update is installed. Is there a way to execute JavaScript code before updating the application so I can initialize the jsonstore, take the data and send to the adapter before performing the update installation? 回答1: There is no

Mobile First - How to segmentate logs depending on the session

这一生的挚爱 提交于 2019-12-11 12:34:36
问题 I'm working on a mobile banking solution using Mobile First v 7.0 and one of the requirements is to isolate the customer's logs in a dedicated log file which gets created once a session is started to track all the details by session. Is it possible to do such thing ? I'm using Liberty profile v 8.5 and I wonder if it's handled in Liberty or there is something which can be done from Mobile First perspective. 回答1: This is not related to MobileFirst but to the underlying application server that

How to enable WL.JSONStore in Worklight project?

不想你离开。 提交于 2019-12-11 12:13:11
问题 When I played with the sample Using_JSONStore, I always tested WL.JSONStore=="undefined" on Android Mobile Browser Simulator or on a Android Virtual Device Emulator, or on my real Android device (Android version 2.3.5). How to enable the WL.JSONStore feature in the Worklight project? Thanks. 回答1: In Worklight 5.0.6.x, JSONStore is always part of the Android and iOS environments, so it is always present. There is nothing to 'enable'. What you want to do, is perhaps initialize it, that is - use

Declare array into searchFields Worklight JSONStore

核能气质少年 提交于 2019-12-11 11:45:40
问题 I have a JSON object to my collection with JSONStore like this: { name : 'name1', industry : ['Banking', 'Energy', 'Insurance', 'Media', 'Retail', 'Telco', 'Travel'], buyer : ['CMO'], link : 'foo.com' } But, how is possible declare the industry field into searchFields?, in order to search a pattern in the array. Cheers 回答1: There's no array type for search fields. You can only index values in objects that are string , boolean , number and integer . You could change: { industry : ['Banking',

j_security_check not found worklight

时光怂恿深爱的人放手 提交于 2019-12-11 11:36:40
问题 I am trying to authenticate my application users with a LDAP module with Worklight. This is working very well with this client code : var ldapRealmChallengeHandler = WL.Client.createChallengeHandler("LDAPRealm"); function wlCommonInit(){ WL.Client.login("LDAPRealm"); } ldapRealmChallengeHandler.isCustomResponse = function(response) { if (!response || response.responseText === null) { return false; } var indicatorIdx = response.responseText.search('j_security_check'); if (indicatorIdx >= 0){

How to deploy MobileFirst CLI application to an android device?

淺唱寂寞╮ 提交于 2019-12-11 11:15:51
问题 I am using MobileFirst CLI 7.1. I want to deploy my MobileFirst CLI application to an android device. How can I do that? In studio i use to get a projected generated when I right click > Build and depoly for all environments. Also I want to know how can I target remote server. (In Studio we had an option to deploy to remote environment.) Do we have any commands for achieving the above two? 回答1: In studio i use to get a projected generated when I right click > Build and depoly for all

IBM Worklight - Clicking a button to navigate to another HTML page doesn't work (multiple page application)

六眼飞鱼酱① 提交于 2019-12-11 10:29:26
问题 I'm trying to follow this guide. I reach a problem when i try to change the HTML file when the user clicks a button. This is my script: <script> window.$ = window.jQuery = WLJQ; $("#btnPromo").click(function(){ $("#pagePort").load("pages/MainPage.html", function(){ alert("loaded!"); }); }); </script> And this is my core HTML file (auto generated by Worklight): <body onload="WL.Client.init({})" id="content" style="display: none;"> <!--application UI goes here--> <div data-role="page" id=

how to get jsessionid shown in browser console in worklight

为君一笑 提交于 2019-12-11 10:26:56
问题 How to get jsessionid shown in browser console in worklight . I have tried document.cookie , but it was invain. I am able to get only WL_PERSISTENT_COOKIE value here. var sessionId = document.cookie; Edit: Pls see http://i.stack.imgur.com/VMm5p.png On giving document.cookie , I am getting the value of WL_PERSISTENT_COOKIE . But I need the value of JSESSIONID . 回答1: JSESSIONID in Worklight is flagged as HttpOnly . This is a security feature that prevents JavaScript access of a cookie,

Worklight - FWLST1040E: ipad build failed: Cannot overwrite template file

我的梦境 提交于 2019-12-11 10:23:07
问题 I'm using worklight for my mobile app project using eclipse. My problem is I cant build ipad native. I got this error during build. FWLST1040E: ipad build failed: com.worklight.builder.exception.WorklightBuildRuntimeException: Resource Manager - Problem reading info.plist file I already use this technique but the problem still occur. Why? 回答1: Try the following: Delete the native folder Close Eclipse Open Terminal.app and write: open $TMPDIR Delete the wlBuildResources folder Open Eclipse

Change IP address to run MobileFirst Android app on real device

。_饼干妹妹 提交于 2019-12-11 09:55:44
问题 I want to run a MobileFirst hybrid Android application my real device (Samsung Galaxy S5 KitKat 4.4.2) My phone and PC are connected on the same network. How can I change the IP address?? I can't find worklightServerRootURL in the file application-descriptor.xml attached below. <?xml version="1.0" encoding="UTF-8" standalone="no"?> <!-- Licensed Materials - Property of IBM 5725-I43 (C) Copyright IBM Corp. 2006, 2013. All Rights Reserved. US Government Users Restricted Rights - Use,