worklight-adapters

Storing and Retrieving images from DB2 using Worklight SQL Adapters?

杀马特。学长 韩版系。学妹 提交于 2020-02-25 05:28:23
问题 I'm trying to store images in DB2 Database as BLOB contents. I used JS to convert the image content to base64 . function loadImageFileAsURL() { var filesSelected = document.getElementById("inputFileToLoad").files; if (filesSelected.length > 0) { var fileToLoad = filesSelected[0]; var fileReader = new FileReader(); fileReader.onload = function(fileLoadedEvent) { var textAreaFileContents = document.getElementById ( "textAreaFileContents" ); textAreaFileContents.innerHTML = fileLoadedEvent

Storing and Retrieving images from DB2 using Worklight SQL Adapters?

空扰寡人 提交于 2020-02-25 05:28:05
问题 I'm trying to store images in DB2 Database as BLOB contents. I used JS to convert the image content to base64 . function loadImageFileAsURL() { var filesSelected = document.getElementById("inputFileToLoad").files; if (filesSelected.length > 0) { var fileToLoad = filesSelected[0]; var fileReader = new FileReader(); fileReader.onload = function(fileLoadedEvent) { var textAreaFileContents = document.getElementById ( "textAreaFileContents" ); textAreaFileContents.innerHTML = fileLoadedEvent

Send request with parameter IBM Worklight

依然范特西╮ 提交于 2020-01-16 18:06:35
问题 I've already use http adapter and successfully send a request but I can't do it with parameter I want to send the parameter cmd=login how to put it in parameter = [] ? var invocationData = { adapter : 'RSSReader', procedure : 'login', parameters :[] }; ----------------------update------------------------------- I try the official parameter format var invocationData = { adapter : 'HTTPAdapter', procedure : 'login', parameters :[{name : 'cmd', value : 'login'}] }; but still send nothing? <?xml

IBM Worklight - Unable to display data retrieved using SQL adapter

放肆的年华 提交于 2020-01-10 05:44:04
问题 I am trying to fetch data from a database and display it in the app. Below is my code. The invokation is doing well, but the data is not displayed. sqlAdapter-impl.js var selectStatement = WL.Server.createSQLStatement("select * from studentinfo"); function getStudentInfos() { return WL.Server.invokeSQLStatement({ preparedStatement : selectStatement, parameters : [] }); } sqlAdapter.js window.$ = window.jQuery = WLJQ; function wlCommonInit() { GetEmployeeData(); } function GetEmployeeData() {

IBM Worklight - Unable to connect to database when using IP address instead of localhost

北城余情 提交于 2020-01-06 12:54:27
问题 I'm currently creating a Worklight application that retrieves some data from my computer's MySQL database. When I try to run the app, it cannot connect to the database. The error happens when I change the URL of the database to an IP address (192.168.6.1 (my computer's localhost)). When I test it from my computer by invoking the worklight procedure (the address is localhost) it works fine, but when I change the URL to the IP address, it shows an error: [ERROR ] FWLSE0012E: ERROR: Could not

IBM Worklight - Unable to connect to database when using IP address instead of localhost

Deadly 提交于 2020-01-06 12:53:12
问题 I'm currently creating a Worklight application that retrieves some data from my computer's MySQL database. When I try to run the app, it cannot connect to the database. The error happens when I change the URL of the database to an IP address (192.168.6.1 (my computer's localhost)). When I test it from my computer by invoking the worklight procedure (the address is localhost) it works fine, but when I change the URL to the IP address, it shows an error: [ERROR ] FWLSE0012E: ERROR: Could not

IBM Worklight 6 - How would i get client IP address on adapter side

我的梦境 提交于 2020-01-06 08:31:50
问题 I want to have client ip address on adapter side but i don't know what is the worklight api for that. I search for it but no luck. I used this api on client side code which is given below WL.Device.getNetworkInfo(function (networkInfo) { console.log ("Ip address of device "+networkInfo.ipAddress); }); It works fine and i can pass this to the adapter from client side. But i just wanted to know whether the same thing can be implemented on server side in adapter procedure. And I also used this

Login Authentication In IBM Worklight

冷暖自知 提交于 2020-01-05 23:31:49
问题 I am using Jquery Mobile to start with IBM worklight project. I have created a Login Page. Whenever user click on the submit button I need the function too run to check for the username and password in the Database. Database -> I am using MY SQl database. Using the command client I have added the tables, username Password and values. I need to check this table whenever user clicks on the submit button. IBM worklight tutorial says I need to add the JDBC jar file to server/lib. I have copy

Login Authentication In IBM Worklight

自闭症网瘾萝莉.ら 提交于 2020-01-05 23:31:37
问题 I am using Jquery Mobile to start with IBM worklight project. I have created a Login Page. Whenever user click on the submit button I need the function too run to check for the username and password in the Database. Database -> I am using MY SQl database. Using the command client I have added the tables, username Password and values. I need to check this table whenever user clicks on the submit button. IBM worklight tutorial says I need to add the JDBC jar file to server/lib. I have copy

add dummy authentication to IBM worklight to create new sessions

[亡魂溺海] 提交于 2020-01-05 04:30:30
问题 Have a multipage form that allows users to register a card through our worklight mobilewebapp. There is no authentication for this as it is just a web based form that uses adapters to get the information back to the servers and continue through the process. Apparently this is bad and the clients are sharing the same session if they start the process at the same time. Basically, if two or more devices begin the enrollment process at the same time, the last one that started will cross-polinate