Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Pass Parameter Master to Detail Page

Hi Expert,

I use ,

master.controller.js

  var context = {

                dino: splits[0],

                revno: splits[1],

                uruntipi : splits[2],

                bindingContext : evt.getSource().getBindingContext()

            };

   

     // this.oRouter.navTo("Detail", context);

     

sap.ui.core.UIComponent.getRouterFor(this).navTo("Detail", context);

detail.controller.js

onInit : function (evt) {

       

       

          var dino ;

          var revno ;

          var uruntipi ;

    //      var oRouter = sap.ui.core.routing.Router.getRouter("appRouter");

         

   

              this.oRouter.attachRouteMatched(function(oEvent) {

                 if (oEvent.getParameter("name") !== "Detail") {

                     return;

                         }

                         dino = oEvent.getParameter("arguments").dino;

                         revno = oEvent.getParameter("arguments").revno;

                         uruntipi = oEvent.getParameter("arguments").uruntipi;

                         bindingContext = oEvent.getParameter("arguments").bindingContext;

                          },

            

             this);

       

}

What is wrong there I get error   "Uncaught TypeError: Cannot read property 'attachRouteMatched' of undefined"

Tags:
replied

what is the issue?

debug it properly, put breakpoint on nav.to() and Detail init() methods.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question