title: SAP UI5: Navigation from Master page and Detail page through two different OData URLs
body: <p>I am trying to create a Master - Detail page using OData servicea in SAPUI5. Everything works fine in the Master page. Meaning I'm able to populate the list with valid data from SAP backend using an OData URL.</p>
  
  <p>Now what I want to achieve is, to call a second OData URL to fetch the detail values and populate that in the page.</p>
  
  <p>My <strong>Master.controller.js</strong></p>
  
  <pre><code>handleListSelect : function (evt) { 
          var context = evt.getParameter("listItem").getBindingContext(); 
          this.nav.to("Detail", context); 
           console.log('evt.getSource: ' + evt.getSource());
              console.log('evt.getBindingContext: ' + evt.getSource().getBindingContext());
      }
  </code></pre>
  
  <p>Console Output gives</p>
  
  <pre><code>"evt.getSource: Element sap.m.List#Master--list" sap-ui-core.js line 80 &gt; eval:31
  "evt.getBindingContext: undefined"
  </code></pre>
  
  <p>I'm unable to populate values in the detail page from the second URL. Can anyone guide or help me on this?</p>
  
  <p>My <strong>Compenent.js</strong></p>
  
  <pre><code>createContent : function() {
  
      // create root view
      var oView = sap.ui.view({
          id : "app",
          viewName : "sap.ui.demo.myFiori.view.App",
          type : "JS",
          viewData : {
              component : this
          }
      });
  
       // Using OData model to connect against a real service
       var url = "/MyFioriUI5/proxy/sap/opu/odata/sap/XXXXXX;mo/";
       var oModel = new sap.ui.model.odata.ODataModel(url, true, "", "");
       oView.setModel(oModel);
  
      // set i18n model
      var i18nModel = new sap.ui.model.resource.ResourceModel({
          bundleUrl : "i18n/messageBundle.properties"
      });
      oView.setModel(i18nModel, "i18n");
  
      // set device model
      var deviceModel = new sap.ui.model.json.JSONModel({
              isPhone : jQuery.device.is.phone,
              isNoPhone : !jQuery.device.is.phone,
              listMode : (jQuery.device.is.phone) ? "None" : "SingleSelectMaster",
              listItemType : (jQuery.device.is.phone) ? "Active" : "Inactive"
      });
      deviceModel.setDefaultBindingMode("OneWay");
      oView.setModel(deviceModel, "device");
  
          // Using a local model for offline development
  //      var oModel = new sap.ui.model.json.JSONModel("model/mock.json");
  //      oView.setModel(oModel);
  
      // done
      return oView;
  }
  </code></pre>
  
  <p>My <strong>Detail.controller.js</strong></p>
  
  <pre><code>sap.ui.controller("sap.ui.demo.myFiori.view.Detail", {
  
      handleNavButtonPress : function(evt) {
          this.nav.back("Master");
      },
  
      onBeforeRendering : function() {
  //      this.byId("SupplierForm").bindElement("BusinessPartner");
      },
  
      handleApprove : function(evt) {
          // show confirmation dialog
          var bundle = this.getView().getModel("i18n").getResourceBundle();
          sap.m.MessageBox.confirm(bundle.getText("ApproveDialogMsg"), function(oAction) {
              if (sap.m.MessageBox.Action.OK === oAction) {
                  // notify user
                  var successMsg = bundle.getText("ApproveDialogSuccessMsg");
                  sap.m.MessageToast.show(successMsg);
                  // TODO call proper service method and update model (not part of this session)
              }
          },
  
          bundle.getText("ApproveDialogTitle"));
      }
  });
  </code></pre>