title: ExtJS - Save State of treePanel.
body: <p><strong>TLDR</strong> I want my treepanel from EXTJS to remember its previous settings. ExtJS-3.2.1</p>
  
  <hr>
  
  <p>I have seen this done before for ExtJS-2.x.x :<a href="http://www.extjs.com/forum/showthread.php?15383-TreePanel-and-stateEvents&amp;p=169002#post169002" rel="nofollow noreferrer">See here on the extjs forums</a>.
  <br/>But as seen as they are pretty much lifeless, with threads on there asking this question or similar with no reply for up to 6months. I thought I would bring it here.</p>
  
  <p>I need to be able to get my treePanel to remember previous opened folders and which boxes are checked. It is async treePanel. Note that this is all client side script.</p>
  
  <p>Panel is as follows:</p>
  
  <pre><code> var layerTree = new Ext.tree.TreePanel({
     border: true,
     region: "east",
     title: 'LayersTree',
     width: 250,
     split: true,
     collapsible: true,
     collapsed: true,
     iconCls: 'treePanelIcon',
     enableDD: true,
     autoScroll: true,
     //pulls in layers and their attributes//
     root: new Ext.tree.AsyncTreeNode({ leaf: false,
       loaded: false,
       expanded: true,
       text: 'Tree Root',
       children: treeLayers
     })
  </code></pre>
  
  <p>Am using ExtJS-3.2.1, GeoExt, OpenLayers.</p>
  
  <p><strong>Anyone done this before or know how to do it? (in extjs-3.2.1)</strong><br />
  (Preferably with a plugin but any answer is appreciated)</p>
  
  <p>Anyone know how to use the save state function of extjs to bind to a cookie?</p>