title: Generate a dynamic ListView
body: <p>I am following the example <a href="http://jquerymobile.com/test/docs/pages/page-dynamic.html" rel="nofollow">http://jquerymobile.com/test/docs/pages/page-dynamic.html</a> , but my problem is that it does not render the page at all, i only se a white page. I do not know what are the problem, even i've changed the <code>page.page()</code> to <code>page.trigger('create')</code>, and also try the <code>content.find(":jqmData(role=listview)").listview('refresh')</code> but nothing at all. The thing is i do not have an error in the console, so i do not know what i am doing wrong. Here is my code:</p>
  
  <pre><code>$(document).bind("pagebeforechange", function(e, data) {
      console.log('[binding][pagebeforechange]');
      if( typeof data.toPage === "string") {
          var u = $.mobile.path.parseUrl(data.toPage);
          if(u.hash.search(/^#watch/) !== -1) {
              console.log('[binding] setWatch');
              var id = u.hash.replace(/.*id=/, "");
              e.preventDefault();
              setWatch(u, id);
          } else if(u.hash.search(/^#playlist/) !== -1) {
              console.log('[binding] setPlaylist');
              //Bind the change page event, and if it is playlist page, call setPlaylist
              playlistId = u.hash.replace(/.*id=/, "");
              e.preventDefault();
              setPlaylist(u);
          }
      }
  });
  
  function setPlaylist(urlObj) {
      console.log('[setPlaylist]');
      var page = $('#playlist');
      var content = $('#playlistContent');
      var html = getListHtml(playlistId); //Here a get the complete list code
      content.empty();
      content.html(html);
      console.log('[setPlaylist] before trigger');
      page.trigger('create');
      //page.page();
      //content.find(":jqmData(role=listview)").listview('refresh');
      page.listview();
  
      var options = {};
      options.reloadPage = true;
      options.dataUrl = urlObj.href;
      options.transition = "slide";
      $.mobile.changePage(page, options);
      console.log('[setPlaylist] changepage');
      location.hash = urlObj.hash;
  }
  </code></pre>
  
  <p>So if you have any idea of what i am doing wrong, please let me know.</p>
  
  <p>Thanks!!</p>
  
  <p>Edit:</p>
  
  <p>If i use <code>content.find(":jqmData(role=listview)").listview('refresh')</code> it show the next error</p>
  
  <blockquote>
    <p>Uncaught TypeError: Cannot read property 'jQuery16401444779944140464'
    of undefined</p>
  </blockquote>
  
  <p>And it seem that the <code>pagebeforechange</code> is it fire twice. Really i did not know what i am doing wrong.</p>