title: Tree implementation using NatTable
body: <p>I try to switch from JFace TreeViewer to NatTable. Unfortunately I didn't find a lot of documentation about implementing trees with NatTable. So I have some questions</p>
  
  <ol>
  <li><p>With TreeViewer I used <code>setInput()</code> to provide new input. How can I achieve the same with NatTable? Is it a proper way to call <code>clear()</code> and <code>addAll()</code> on underlying data source <code>List</code>? (I use GlazedLists)</p></li>
  <li><p>I use described <code>clear()</code>/<code>addAll()</code> way to pass new data after querying a database. And after it expanded state of tree is lost, all nodes are colapsed. With JFace TreeViewer I used 
  <code>getExpandedElements()</code> / <code>setExpandedElements()</code> to keep expanded state. Is there something similar available in NatTable?</p></li>
  <li><p>Is it possible to load child tree nodes only when parent node is clicked? I can't build beforehand all tree data because I can have cycles in it (well, strictly speaking my data is not really a tree, but it's convenient to display it like a tree)</p></li>
  </ol>
  
  <p><strong>UPD:</strong> Not sure if I should ask it here or create separate question</p>
  
  <ol start="4">
  <li>I have problems with sorting. I've found similar discussion here <a href="https://www.eclipse.org/forums/index.php?t=msg&amp;th=489524" rel="nofollow">https://www.eclipse.org/forums/index.php?t=msg&amp;th=489524</a> but I still don't have deep understanding. </li>
  </ol>
  
  <p>My problem: after sorting on any column other than 'tree' column child nodes can move to invalid parent. Though the order of elements is correct on all levels of hierarchy. I use <code>SortableTreeComparator</code> and as <code>treeComparator</code> I use my custom comparator (not <code>GlazedLists.beanPropertyComparator</code> as in example). What can be wrong here?</p>