Dear Gurus,
As my title, I'm tryig to create an App which contains a Full-screen Menu page with some tiles, and when user presses on one, it navigate to another Master-Detail page. My problem is I can't show the detail page. My code works as below:
manifest.json
:
"routing": {
"config": {
"routerClass": "sap.m.routing.Router",
"viewType": "XML",
"viewPath": "WYTH.view",
"controlId": "rootApp",
"controlAggregation": "pages"
},
"routes": [{
"pattern": "menu",
"name": "menu",
"view": "Menu",
"targetControl": "rootApp",
"targetAggregation": "pages"
}, {
"pattern": "zwm01",
"name": "zwm01",
"view": "ZWM01Root",
"targetControl": "rootApp",
"targetAggregation": "pages",
"subroutes": [{
"pattern": "zwm01/",
"name": "zwm01master",
"view": "ZWM01Master",
"targetControl": "ZWM01",
"targetAggregation": "masterPages",
"subroutes": [{
"pattern": "zwm01/",
"name": "zwm01detail",
"view": "ZWM01Detail",
"targetControl": "ZWM01",
"targetAggregation": "detailPages"
}]
}]
}]
},
I managed to show the menu view with this. When I click on 1 tile, it fires the function below:
navZWM01: function() {
this.getRouter().navTo("zwm01", false);
},
In result, it doesn't show the detailpage, but the masterpage
Any suggestions?
Best regards
if
atonAfterRendering
listener to check whether the device is not a phone, it will perform a second navigation to the detail view as u mentioned. Thank you a lot sir. – T.NQ