on 02-23-2015 7:08 AM
Hi ,
our back end is oracle database , usually we use jdbc connectors and connect to oracle db and fetch data and process etc , in UI5 application can anyone explain how to connect to oracle database .
our ui5 appilcation developed has a view which is based on java script controller .
Regards
Govardan Raj S
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This message was moderated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You can write a java servlet.
In the java servlet write your jdbc code and return it to the client formatted as JSON (there are many JSON packages for java).
In the client (SAPUI5) side create a JSON model and call the servlet.
Regards,
Omri
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi Omri,
i created a local java file first , in which in connecting to oracle database and also using json jar file im creating json object i.e created a method that returns json object with data from odb, and now how can i access this json object in the controller ? Im new to UI5 pleaes suggest a solution..
Regards
Govardan Raj
Hi,
You should use a java servlet and not local file (you should do it on the server).
In the SAPUI5 you should use JSON model:
var oModel = new sap.ui.model.json.JSONModel();
oModel.loadData('http://your_j2ee/your_servlet);
Regards,
Omri
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.