on 11-13-2015 4:30 PM
hi,
I am trying to implement routing in a fiori like app,Could anyone suggest me by providing better examples on routing in splitapp, which consumes both json and odata.
I am following these documents
Step 3: Navigation and Routing - UI Development Toolkit for HTML5 (SAPUI5) - SAP Library
Please help me out, by providing better examples.
thanks,
Sanjo Thomas
json and odata are about model/data NOT routing.
do you have some specific question? A master-detail template from webide is a good strating point if you need an example
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
I am trying to implement routing in my application.After some research, I am now able to implement routing in simple apps, but I facing lot of trouble in implementing in my fiori like app that I am developing.Like I am still not clear how to provide serviceurl(odata) in the component.js, where I have defined the routing, or how to provide routes in a splitapp, etc.
So, I just want some examples, which would clear my doubts.
Hello,
The concepts are very neatly here.
I will explain them in brief here.
There are multiple levels at which you can set model in the SAPUI5 application. It can be set at Component Level, View Level, Control Level, etc. We usually keep all the configurations in a single consolidated file so that any change made at one place gets updated everywhere. Now if you want to provide service URL in component file you need to give the full path. An example of manifest.json is -
{
"_version": "1.1.0",
"sap.app": {
"_version": "1.1.0",
"id": "<id>",
"type": "application",
"title": "App Name",
"description": "App Desc",
"applicationVersion": {
"version": "1.0.0"
},
"ach": "CA-UI5-DOC"
},
"sap.ui": {
"_version": "1.1.0",
"technology": "UI5",
"deviceTypes": {
"desktop": true,
"tablet": true,
"phone": true
},
"supportedThemes": [
"sap_bluecrystal"
]
},
"sap.ui5": {
"_version": "1.1.0",
"rootView": "<namespace>.view.App",
"dependencies": {
"minUI5Version": "Comment: Minimum version of SAPUI5 which is supported",
"minUI5Version": "1.30",
"libs": {
"sap.m": {}
}
},
"config": {
"Detail": "<host:port>/sap/opu/odata/sap/<ServiceNam>/tileSummary/"
},
"routing": {
"config": {
"routerClass": "sap.m.routing.Router",
"viewType": "XML",
"viewPath": "<namepsace-viewpath>.view",
"controlId": "app",
"controlAggregation": "pages"
},
"routes": "Comment: Routing Paths",
"routes": [
{
"pattern": "",
"name": "summary",
"target": "summary"
}
],
"targets": {
"summary" : {
"viewName": "summary"
}
}
}
}
}
Here I have mentioned the OData service URL in the manifest.json file under a config parameter with name 'Detail'. I will use the same to create OData Model and set it on any level as mentioned by me above. The 'targets' will define the routes.
Revert in case of further questions.
BR.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.