on 04-07-2016 8:08 AM
hello all
I am developing a ui5 app using hcp web ide. The application will be deployed to the HCP platform. we have created a destination in the HCP which points to the gateway server. I am bit confused how the Gateway Server and oData Model be referenced in the neo-app.json and Menifest.json
So in the neo-app.json, I have referred to the destination
{
"path": "/sandboxgateway/sap/opu/odata",
"target": {
"type": "destination",
"name": "GCN_Inbound",
"entryPath": "/sap/opu/odata"
},
"description": "Connectivity to Gateway Sandbox(GCN)"
}
In the Manifest.json, I have defined a datasource
"dataSources": {
"ewm": {
"uri": "/sap/opu/odata/<name>",
"type": "OData",
"settings": {
"annotations": [],
"odataVersion": "2.0",
"localUri": ""
}
}
}
and then defined a named model with the above data source
"ewmModel": {
"dataSource": "ewm"
}
Does this look correct? so when the component is instantiated, the odata model will be created automatically using the correct destination?
or, do I have to put the destination name as well in the datasource definition?
Thanks
Sandip
Hi Sandeep,
This looks correct to me. You don't have to mention the detination name again inside ewmModel:{}.
You can make use of the model as follows:
var oModel = this.getModel("ewmModel");
oModel.read("/<name>('abc')"),{}
Here, I have used <name> as per the following snippet in your query:
"dataSources": {
"ewm": {
"uri": "/sap/opu/odata/<name>",
"type": "OData",
....
Hope this helps.
Regards,
Fahad
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.