Skip to Content

How to navigate back to master view from detail view while loading the app initially?

Hi all,

I use XML view for coding. When I login to the app, it directly goes to the detail page in the mobile view and I'm unable to go back to my Master page. I need to show the master list initially or my detail page should automatically show a back button to navigate to master page.

Here I have attached my component.js code:

routing: {
config: {
viewType: "XML",
viewPath: "ExitProcess.views",
clearTarget: false,
controlId: "idSplitApp",
controlAggregation: "pages",
transition: "show"
routes: [
 pattern: "",
 name: "Master",
 target: "Master",
 controlAggregation: "masterPages"
 name :"Detail",
 target: "Detail",
 controlAggregation: "detailPages"
targets: {
Master: {
viewName: "Master",
controlAggregation: "masterPages"
Detail: {
viewName: "Detail",
controlAggregation: "detailPages"

I didn't get the menu button that navigates to the master page in mobile view. Can someone help me with this?



Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    Jun 02, 2017 at 10:40 AM

    Hi Ramya,

    you can follow anyone of the following solutions which suits best for your case:

    Solution 1: If the detail is loading after the master list is loaded i.e in the updateFinished method of the master list then you can add a small check in this method to restrict the load or routing to detail page. like follows


    Solution 2: to enable the nav back button in the detail view add this piece of code and in the controler for the navback event route back to master page. this is when the device model is set.


    solution 3: manually setting a json model, assign the json to detail screen and refer the path in showNavButton property in detail screen an example code like follows

    //in onInit of Controller<br>	var d = false;
    			if ( {
    				d = true;
    <br>	var oViewModel = new JSONModel({
    				device: d
    this.getView().setModel(oViewModel, "detailView");
    //in Detail.view 
    	<Page showNavButton="{detailView>/device}" navButtonPress="onNavBackDetail"/>



    Add comment
    10|10000 characters needed characters exceeded