title: Display JSON results in Appcelerator
body: <p>So I'm trying to switch to Appcelerator and am having some trouble figuring out exactly how it works. Trying to just have a simple button that loads a new window and lists some SQL entries. I'm not getting any errors, but page is showing blank. I'm certain I'm making an obvious mistake, would help if someone could point in right direction. Returned JSON array is correct.</p>
  
  <p>Index.xml</p>
  
  <pre><code>&lt;Alloy&gt;
      &lt;Window class="container"&gt;
      &lt;/Window&gt; 
  &lt;/Alloy&gt;
  </code></pre>
  
  <p>bookdetails.js</p>
  
  <pre><code>&lt;Alloy&gt; 
     &lt;Window class="container"&gt; 
     &lt;/Window&gt; 
  &lt;/Alloy&gt;
  </code></pre>
  
  <p>Index.js</p>
  
  <pre><code>var args = arguments;
  var data = [];
  var win = Ti.UI.createWindow({
  title: 'Title goes here',
  layout: 'vertical',
  backgroundColor: '#123456',
  });
  
  var button = Ti.UI.createButton({
      title: 'My button',
      top: 10,
      height: 40,
      width: 200
  });
  
  button.addEventListener('click', function() {
      // Check console
      Ti.API.info('User clicked the button ');
      var dataview = Alloy.createController("bookdetails").getView();
      dataview.open();
  
  });
  win.add(button);
  win.open();
  </code></pre>
  
  <p>bookdetails.js</p>
  
  <pre><code>var win = Ti.UI.createWindow({
  title: 'Title goes here',
  layout: 'vertical',
  backgroundColor: '#123456',
  });
  var data = [];
  var xhr = Titanium.Network.createHTTPClient();
      xhr.onload = function(){
          var logins = JSON.parse(xhr.responseText);
          for(var i = 0; i &lt; logins.length; i++) {
              data.push[logins[i]];
          }
          var table = Ti.UI.createTableView({ objName: 'table' });
          for (var i = 0; i &lt;= data.length; i++){
               var row = Ti.UI.createTableViewRow({
              className: 'row',
              objName: 'row',
               touchEnabled: true,
               height: 100
           });
    table.setData(data);
    win.add(table);
  }
  
      };
      xhr.open('GET', 'http://www.xxxxxxxx.com/check.php');
      xhr.send();
  
  win.open();
  </code></pre>