on 10-20-2020 9:08 AM
I am working on an application which has View1 on clicking a button it navigates to View2, which is supposed to be Master-Detail View. I am following this tutorial.
This is what my views folder looks like (just to be more clear); [App, View1, View2, Master, Detail ]
The problem is that I have to add rooting config in manifest for Master-detail view, which is already set for App. Is it possible to somehow add multiple config?
Manifest.json
"sap.ui5": {
"rootView": {
"viewName": "QuickStart.Ui5.view.app",
"type": "XML"
},
...
"routing": {
"config": {
"routerClass": "sap.m.routing.Router",
"viewType": "XML",
"async": true,
"viewPath": "QuickStart.Ui5.view",
"controlAggregation": "pages",
"controlId": "idAppControl"
},
"routes": [
{
"name": "TargetView1",
"pattern": "",
"view": "View1",
"viewType": "XML",
"targetControl": "idAppControl",
"targetAggregation": "content",
"clearTarget": true,
"target": [
"TargetView1"
]
},
{
"name": "Target_View2",
"pattern": "View2",
"target": [
"Target_View2"
]
},
{
"pattern": ":layout:",
"name": "master",
"target": [
"master"
]
},
{
"pattern": "detail/{product}/{layout}",
"name": "detail",
"target": [
"master",
"detail"
]
}
],
"targets": {
"TargetView1": {
"viewType": "XML",
"transition": "slide",
"clearAggregation": true,
"viewId": "View1",
"viewName": "View1"
},
"Target_View2": {
"viewType": "XML",
"transition": "show",
"clearControlAggregation": false,
"viewName": "View2",
"viewLevel": 2
},
What is your starting app? Master details or empty UI5? did you create it with WebIDE template?
From the storyboard view (left menu)in Web IDE there is a visual option to add view to empty apps
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
There is only on root view for an app
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So how should I add config for master-detail view?
This is what I would have to add according to tutorial;
,
"routing": {
"config": {
"routerClass": "sap.f.routing.Router",
"viewType": "XML",
"viewPath": "sap.ui.demo.fiori2.view",
"controlId": "flexibleColumnLayout",
"transition": "slide",
"bypassed": {
},
"async": true
},
"routes": [
{
"pattern": ":layout:",
"name": "master",
"target": [
"master",
"detail"
]
},
{
"pattern": "detail/{product}/{layout}",
"name": "detail",
"target": [
"master",
"detail"
]
}
],
"targets": {
"master": {
"viewName": "Master",
"controlAggregation": "beginColumnPages"
},
"detail": {
"viewName": "Detail",
"controlAggregation": "midColumnPages"
}
}
}
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.