title: SAPUI5: Routing with parameters - How get correct path of binding context
body: <p>I am trying to implement routing with parameters as in this walkthrough: <a href="https://sapui5.hana.ondemand.com/1.58.7/#/topic/2366345a94f64ec1a80f9d9ce50a59ef" rel="nofollow noreferrer">https://sapui5.hana.ondemand.com/1.58.7/#/topic/2366345a94f64ec1a80f9d9ce50a59ef</a></p>
  
  <p>However, instead of getting data as a path</p>
  
  <pre><code>/Invoices(CustomerName='Alfreds%20Futterkiste',Discount=0f,OrderID=10835....
  </code></pre>
  
  <p>when they do:</p>
  
  <pre><code>oRouter.navTo("detail", {invoicePath: 
  oItem.getBindingContext("invoice").getPath().substr(1)});
  </code></pre>
  
  <p>when I use the function in my controller (see onFwdDetail below), I only get a string path:</p>
  
  <pre><code>nodes/0
  </code></pre>
  
  <p>And this cannot be used in routing (see manifest.json below):</p>
  
  <pre><code>Invalid value "nodes/0" for segment "{detailPath}".
  </code></pre>
  
  <p>I am assuming it is because my JSON file is structured differently than in the walkthrough. How do I get the correct path with data for routing?</p>
  
  <p>The relevant section of my implementation are as follows:</p>
  
  <p><strong>Data.JSON</strong></p>
  
  <pre><code>{
  "nodes": [
      {
          "text": "Text1",
          "status1": "Status10",
          "status2". "Status11"
      },
      {
          "text": "Text2",
          "status1": "Status20",
          "status2". "Status21"
      },...]
  }
  </code></pre>
  
  <p><strong>Overview.view.xml</strong></p>
  
  <pre><code>&lt;Table
      items="{path: 'mydata&gt;/nodes'}"&gt;
  ...
  &lt;ColumnListItem type="Navigation" press="onFwdDetail"&gt;
  </code></pre>
  
  <p><strong>Overview.controller.js</strong></p>
  
  <pre><code>onInit : function() {
          var oModel = new JSONModel("model/Data.JSON");
          this.getView().setModel(oModel, "mydata");
  
      },
  onFwdDetail : function(oEvent) {
          var oItem = oEvent.getSource();
          var oRouter = sap.ui.core.UIComponent.getRouterFor(this);
          oRouter.navTo("detail", {detailPath: 
             oItem.getBindingContext("mydata").getPath().substr(1)});
          console.log(oItem.getBindingContext("mydata").getPath().substr(1));
  
      }
  </code></pre>
  
  <p><strong>manifest.json</strong></p>
  
  <pre><code>{
  "pattern": "details/{detailPath}",
  "name": "details",
  "target": "details"
  }
  </code></pre>