title: Select dynamically generated element by id in Titanium Appcelerator
body: <p>I am working with the latest Tianium Appcelerator and my project is using Alloy.</p>
  
  <p>I have a <code>TableView</code> with the id: <code>tblResults</code></p>
  
  <p>In my controller, I populate this table view with rows like this:</p>
  
  <pre><code>// Dummy data
  var results = [];
  results.push({
      title: 'Hello World',
      value: '123456'
  });
  results.push({
      title: 'Bye World',
      value: '654321'
  });
  
  // Build result data
  var resultData = [];
  for (var i = 0; i &lt; results.length; i++) {
      resultData.push(createResultRow(
          results[i].title,
          results[i].value
      ));
  }
  
  // Method to create result row
  function createResultRow(myTitle, myValue) {
      var tableRow = Titanium.UI.createTableViewRow({
          height: 160
          id: 'row-'+ myValue
      });
      var tableRowView = Titanium.UI.createView({
          layout: 'horizontal'
      });
      var myButton = Titanium.UI.createButton({
          title: myTitle,
          btnValue: myValue
      });
      myButton.addEventListener('click', function(e) {
          handleButtonClick(e);
      });
      tableRowView.add(myButton);
      tableRow.add(tableRowView);
      return tableRow;
  }
  
  // Set table data
  $.tblResults.setData(resultData);
  
  // Method to handle button click
  function handleButtonClick(e) {
      if (e.source &amp;&amp; e.source.btnValue) {
          // how to select row having a id: 'row-'+ e.source.btnValue ???
      }
  }
  </code></pre>
  
  <p>What this will do is, generate a dummy array of objects. Then using that, populate the table view with row that has a view, within it there is a button.</p>
  
  <p>What I am trying to achieve is, when the button is clicked, I want to select the table row having the id like this:</p>
  
  <p><code>'row-'+ e.source.btnValue</code></p>
  
  <p>in pure javascript/jquery DOM style, I would have done something like this:</p>
  
  <p><code>$('#row-'+ e.source.btnValue)</code></p>
  
  <p>How can I achieve this in Titanium Appcelerator? Is there a element selector functionality of some sort like in jQuery?</p>