title: SAPUI5: how to getBindProperty from property that was binded from model?
body: <p>I have this code:</p>
  
  <pre><code>//create table
  tableContent=getcontent();
  
      var oTable2 = new sap.ui.table.Table(tableId, {
          width : "100%",
          visibleRowCount: tableContent.length,
          selectionMode : sap.ui.table.SelectionMode.None,
          resizable : false,
          flexible : false
      });
  
      var img = new sap.m.Image({
              press: function() {console.log(img.getProperty("src"))
          }});
  
      img.bindProperty("src", "src");
  
      oTable2.addColumn(new sap.ui.table.Column({
              label: new sap.ui.commons.Label({ text: "" }),
              template: img,
              autoResizable: false,
              width : '10%'
          }));
      var oModel2 = new sap.ui.model.json.JSONModel();
      oModel2.setData({ modelData: tableContent });
      oTable2.setModel(oModel2);
      oTable2.bindRows("/modelData");
      oTable2.sort(oTable2.getColumns()[0]);
      oTable2.placeAt(containingDivId);
  </code></pre>
  
  <p>Problem is that I am defining a property in the constructor that should print the <code>img</code> source:</p>
  
  <pre><code>var img = new sap.m.Image({
              press: function() {console.log(img.getProperty("src"))
          }}); 
  </code></pre>
  
  <p>But when I am trying to take it like this:</p>
  
  <pre><code>img.bindProperty("src", "src");
  </code></pre>
  
  <p>I am getting blank text (nothing).</p>
  
  <p>How can I get this bounded value? Any other function?</p>
  
  <p>Second question: How can I add custom property to <code>img?</code> Say I wont to have in img: src, alt and myCustomTxt. How can I add the property <code>myCustomTxt</code>?</p>
  
  <p><strong><em>update:</em></strong></p>
  
  <p>I've tried:</p>
  
  <pre><code>  var img = new sap.m.Image({
          "src" : "assets/images/btn-X.png",
          "press" : function(event) {
              var binding = event.getSource().getBindingInfo("src").binding;
  
                  console.log(binding.getValue());
  
          }
      });
  </code></pre>
  
  <p>but I am getting this error when pressing a image:</p>
  
  <pre><code>cart-module.js:151 Uncaught TypeError: Cannot read property 'binding' of undefined(…)
  </code></pre>
  
  <p>Thanks!</p>