Projects: LiveTree
LiveTree implements a JavaScript/DHTML tree (hierarchical list) widget that loads data asynchronously as-needed (using AJAX). This makes it ideal for cases where the dataset is too large to load to the browser all at once. Data can be provided in the HTML page as well, in which case no asynchronous loading is needed, making this widget suitable for standalone client-side use.
Note: I'm afraid that this project is essentially abandoned. While I would love to do more work on LiveTree and with Rails in general, my life has gotten busier and there just isn't time. I won't be much use answering questions about using it either because it's been so long since I've looked at the code. If anyone would be interested in taking over the project, I have some half-finished and buggy code for some new features, as well as a few patches that users have sent, that I would be happy to provide. Also, if anyone has good suggestions for alternative tree controls for Rails that I can link to here, please send them in.
LiveTree consists of two components: client-side JavaScript code that runs in the user’s browser which displays and allows the user to navigate the tree, and a server component that provides data to the client. The client-server protocol is very simple, which means server components can be easily created for just about any web server configuration with minimal effort. Presently, the only existing server component is for Ruby On Rails.
This is in early development, but does work nicely for me. See STATUS for details about its current status.
News
- July 3, 2007 - Posted notice that this project is abandoned.
- January 29, 2006 - Version 0.1.2 released. See CHANGES for details.
- January 16, 2006 - Version 0.1.1 released. Not much has changed; just dusting off the code. See CHANGES for details. Also released is the source code for the demo, if you would like working example code.
Features
- Can load data asynchronously as-needed (so only the parts of the tree the user needs are sent to the client).
- Ideal for large/deep data sets (such as navigating a file system, or complete table of contents of a book).
- Intelligently pre-loads parts of the tree that it anticipates the user will want to look at, so delays for the user are minimized.
- Customizable using CSS, snippets of HTML, event handlers, and many options.
- Controllable from JavaScript.
- Supports deep linking - can jump to a part of the tree that has not been loaded yet, and it will search for that item and load its parents.
- Supports an "active" (highlighted) item.
- Automatically scrolls the tree so that what the user is interested in is on the screen.
- Tight integration with Ruby on Rails. Can Use acts_as_tree or acts_as_nested_set model for data.
- Minimal server requirements.
- Can be used standalone (client-side only without server support).
Downloads
Latest Version (0.1.2)
Previous Versions
Documentation
See the RDocs for more information. In particular:
Screenshot
Demo
You can try out a demo of LiveTree here: live-tree.epiphyte.ca.
Please note that this demo is running on a server which may not always be available or be very fast, so YMMV.
You can also download the source code for this demo, for complete working examples. See the enclosed README.live_tree_demo for setup instructions:
Latest Version (0.1.2)
Previous Versions
Copyright 1995-2009 Emanuel Borsboom.
All content on this site is licensed under a
Creative Commons License,
unless otherwise specified.
