cancel
Showing results for 
Search instead for 
Did you mean: 

splitApp: show detail AND master view through routing

b_deterd2
Active Contributor
0 Kudos

Hello All,

I was wondering how to show a view in the master area of the splitapp component AND a view in the detail area through routing.

I can show a view in the master or detail but not in both directly.

Regards,

Bert

Accepted Solutions (1)

Accepted Solutions (1)

b_deterd2
Active Contributor
0 Kudos

Thanks all for your answers.

The problem was I got an error while loading the detail view in the detailPages area. The error was: "Control with ID mySplitApp could not be found".

I have set my  targetControl : "mySplitApp" in the config of the routing.

When I delete this and set my targetControl in the first route everything works fine. Do not exactly why I can't set my targetControl in the config but it works now.

Answers (3)

Answers (3)

Former Member
0 Kudos

If i understood your requirement correctly, you have to load both master and detail page at initial load. If that is the case you can do this.

{

        pattern: "",

        name: "masterfirst",

        view: "Masterview",               // this is should be the name of the master view

        targetAggregation: "masterPages",

        subroutes: [

                    {

                    pattern: "",

            name: "detailfirst",

            view: "DetailView",          // this should be the detail view

            targetAggregation: "detailPages",

                    }

                   

        ]

   }

Sapui5 loads the view which has an empty pattern, so you can give "" pattern for both master and detail.

Former Member
0 Kudos

In the onInit method of the master view's controller navigate to the detail view.

onInit : function() {

                         this.getOwnerComponent().getRouter().navTo("detail",{

                                        param : paramValue;

                              });

                    },

kind regards,

RW

santhu_gowdaz
Active Contributor
0 Kudos