| Summary: A column-based Tree widget for ExtJS |
| Author: Ryan Petrello |
| Published: September 25, 2007 |
| Version: 0.1a |
| Ext Version: 1.1 |
| License: |
| Demo Link: View Demo |
| Forum Post: View Post |
Contents |
This component, largely developed during my recent stay at Optio Software, provides a manageable widget for representing an alternative tree view reminiscent of the Column View interface element found (most notably) in Apple's Finder. The internal structure of the component closely mimics the idealogy behind Ext's own Tree component, and can be used to interact with just about any type of Ext.data.Store.
See the demo for the latest source.
Ext.onReady(function() { /* * Here we use an HttpProxy to read in a view of the file system. * * This store could potentially read from any source you'd like (in-memory * or stored server-side), and a variety of data formats from JSON, XML, * or simple arrays using the variety of DataProxy and DataReader * implementations supplied in Ext.data. */ var ds = new Ext.data.Store({ proxy: new Ext.data.HttpProxy({url: 'tree.php'}), reader: new Ext.data.JsonReader({ root: 'results', id: 'id' }, [ {name: 'id'}, {name: 'label'}, {name: 'leaf'} ]), id: 'id' }); new Ext.ux.ColumnTree({ store: ds, displayField: 'label', }).render('tree'); ds.load(); });
v0.1a Ryan's initial design