title: Getting the bound data object of pressed table row - getBindingContext() returns undefeind
body: <p>In SAP UI5, I try to get the data object (in my controller) that is bound to a table row when the user presses it. My view is defined in XML, and my controller is in JS of course.</p>
  
  <p>I have checked <a href="https://stackoverflow.com/questions/22599188/how-to-get-content-of-a-row-in-sap-m-table">How to get content of a row in sap.m.table</a> already but it doesn't work for me, or something is missing.</p>
  
  <p>My view (the relevant part):</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;Panel&gt;
    &lt;Table id="lineItemList" items="{
      path: 'statusJobs&gt;/jobs',
      sorter: {
        path: 'start',
        descending: true
      }
    }"&gt;
    &lt;headerToolbar&gt;
      &lt;!-- ... --&gt;
    &lt;/headerToolbar&gt;
    &lt;columns&gt;
      &lt;Column hAlign="Left" vAlign="Middle"&gt;
        &lt;Label text="Job" /&gt;
      &lt;/Column&gt;
      &lt;Column hAlign="Center" vAlign="Middle"&gt;
        &lt;Label text="Start" /&gt;
      &lt;/Column&gt;
      &lt;Column hAlign="Center" vAlign="Middle"&gt;
        &lt;Label text="End" /&gt;
      &lt;/Column&gt;
      &lt;Column hAlign="Right" vAlign="Middle"&gt;
        &lt;Label text="Success" /&gt;
      &lt;/Column&gt;
    &lt;/columns&gt;
    &lt;ColumnListItem
      type="Navigation"
      press=".handleLineItemPress"
    &gt;
      &lt;Text text="{statusJobs&gt;job}" /&gt;
      &lt;Text text="{
        path: 'statusJobs&gt;start',
        formatter:'util.Formatter.Date'}"
      /&gt;
      &lt;Text text="{
        path: 'statusJobs&gt;end',
        formatter: 'util.Formatter.Date'}"
      /&gt;
      &lt;Text text="{statusJobs&gt;status}"/&gt;
    &lt;/ColumnListItem&gt;
  &lt;/Table&gt;     
  </code></pre>
  
  <p>The relevant part here is obviously:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;ColumnListItem
    type="Navigation"
    press=".handleLineItemPress"
  &gt;
  </code></pre>
  
  <p>And in my controller, I have this:</p>
  
  <pre class="lang-js prettyprint-override"><code>handleLineItemPress: function(evt) {
    console.log('evt.getSource: ' + evt.getSource());
    console.log('evt.getBindingContext: ' + evt.getSource().getBindingContext());
  }
  </code></pre>
  
  <p>which logs as follows:</p>
  
  <blockquote>
    <p>evt.getSource: Element sap.m.ColumnListItem#__item11-StatusJobs--lineItemList-0
    evt.getBindingContext: undefined</p>
  </blockquote>
  
  <p><code>evt.getSource</code> returns the ColumnListItem, so of course from there, I could use the object hierarchy and fetch the text of a cell, like:</p>
  
  <pre class="lang-js prettyprint-override"><code>evt.getSource().getCells()[0].getText();
  </code></pre>
  
  <p>But this does not seem to be the right way and especially does not give the the entire object nor its unique ID, which I happen to not display in the table.</p>
  
  <p>I am somehow missing the connection back to my data model, that I had bound earlier in the code, in the <code>&lt;Table&gt;</code> item, as follows:</p>
  
  <pre><code>items="{
    path: 'statusJobs&gt;/jobs',
    sorter: {
      path: 'start',
      descending: true
    }
  }"
  </code></pre>