on 05-11-2016 1:28 PM
Hello All,
As per my requirement I have created the split app using SAP UI5 controls in hcp. And in the detail side, I have the table which list the service tickets from there I would like to navigate to another view (Service detail - custom view created).
For this routing and navigation, I have set the routing infor and configurations in manifest.json as like below:
"routing": {
"config": {
"routerClass": "sap.m.routing.Router",
"viewType": "XML",
"viewPath": "SplitApp.view",
"controlId": "idAppControl",
"bypassed": {
"target": []
},
"async": true
},
"routes": [
{
"pattern": "",
"name": "splitapp",
"controlAggregation": "detailPages",
"target": "SplitApp"
},
{
"pattern": "srvdetail/{ID}",
"name": "srvdetail",
"target": ["splitapp" , "srvdetail"]
}
],
"targets": {
"splitapp": {
"viewName": "SplitApp",
"viewId": "SplitApp",
"viewLevel": 1
},
"srvdetail": {
"viewName": "SrvDetail",
"viewId": "srvdetail",
"viewLevel": 2
},
"objectNotFound": {
"viewName": "ObjectNotFound",
"viewId": "objectNotFound"
},
"notFound": {
"viewName": "NotFound",
"viewId": "notFound"
}
}
}
Then in the controller of initial view, inside the onpress event, I have set the binding context and and the value selected got filled. But on exectuing last line its shows error as "The segment {ID} is required."
this._router = sap.ui.core.UIComponent.getRouterFor(this);
var oBindContext = oEvent.getSource().getBindingContext();
var oModel = oBindContext.getModel();
// var oRouter = sap.ui.core.UIComponent.getRouterFor(this);
var sObjectID = oModel.getData(oBindContext.getPath()).ID;
this._router.navTo("srvdetail", {Id: sObjectID});
Please post your suggestions on this.
Regards
Swadini S
Hi Swadini ,
It is Case sensitive .
this._router.navTo("srvdetail", {ID: sObjectID});
Regards,
Jibin Joy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi All,
Again am facing problem in navigation I have set new page for login and trying to navigate to second split app page in my sap ui5 application. On navigating what happens is, it prints the console and alerts in splitapp controller (target view's controller) but not displaying its corresponding splitapp view.
It was so weird, if it follows mvc , then how come the controller loads without showing the view.
If the problem is with displaying, then where am making mistake.
Please help me with the ideas of navigation as am being confused.
Thank you!
Regards
Swadini Sujanaranjan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
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.