Pb with an inset listview. How to refresh/create it ?

Pb with an inset listview. How to refresh/create it ?


Hi, 
I have a question about en inset listview.
I can't manage to refresh the listview. Only the inset list inside is refreshed.

Do you know how should I do ?

I am using jqm 1.4.4

Cheers !




  1. function renderList_house_objects(device) {
  2.     $('#house_objects_schema li').remove();
  3.     
  4.     $.each(JSON.parse(window.localStorage.getItem("objects")), function(index, item) {
  5.         $('#house_objects_schema').append('<li data-role="collapsible" data-iconpos="right" data-inset="false">');
  6.         $('#house_objects_schema').append('<h2>'+ item +'</h2>');
  7.         $('#house_objects_schema').append('<form>');
  8.         $('#house_objects_schema').append('<fieldset data-role="controlgroup" data-type="vertical">');        
  9.         $.each(JSON.parse(window.localStorage.getItem(item)), function(index, item1) {
  10.             $('#house_objects_schema').append('<label>'+item1.value.header.source+'<input type="checkbox" id="choose-object-inset-'+ item1.key +'"></label>');
  11.         });
  12.         $('#house_objects_schema').append('</fieldset>');
  13.         $('#house_objects_schema').append('</form>');
  14.         $('#house_objects_schema').append('</li>');
  15.     });
  16.     
  17.     $('#house_objects_schema').listview('refresh');
  18.     $('#house_objects_schema').listview().listview('refresh');
  19.     $('#house_objects_schema').trigger('create');
  20. }