Vaadin TreeTable
A table implementation that supports displaying hierarchical structures
The TreeTable is an extended Table component that can show hierarchical structures in its first column. Users can show or hide children from a small icon before the actual column value in the first column.
The TreeTable is designed to scale well with large number of rows similar to Table component in the core Vaadin. Only visible rows and some "cache rows" are loaded to the client side. With the Collapsible container extension developer can build the data accessing so that it does not consume too much memory on the server side either.
TreeTable has been integrated into Vaadin 6.7 and this add-on will not receive any further updates. All changes will be made to the Vaadin Framework only.
Sample code
TreeTable tr = new TreeTable("Simple test with builtin container"); // populate table tr.addContainerProperty("Foo", String.class, "foo"); tr.addContainerProperty("Bar", String.class, "bar"); Object addItem = tr.addItem(); tr.getContainerProperty(addItem, "Foo").setValue("First"); Object addItem2 = tr.addItem(); tr.getContainerProperty(addItem2, "Foo").setValue("Second"); Object addItem3 = tr.addItem(); tr.getContainerProperty(addItem3, "Foo").setValue("Third"); // build hierarchy tr.setParent(addItem3, addItem2); tr.setParent(addItem2, addItem); // flag to last item to be leaf tr.setChildrenAllowed(addItem3, false); // reserve excess space for the "treecolumn" tr.setWidth("100%"); tr.setColumnExpandRatio("Foo", 1);
Links
- Source Code
- Demo: WorkLog app with one component
- Demo: ImageBrowser lists directory on server containing images
- Author Homepage
- Issue Tracker
Compatibility
Was this helpful? Need more help?
Leave a comment or a question below. You can also join
the chat on Discord or
ask questions on StackOverflow.
Version
Fix: Item icon is now clickable to select row
- Released
- 2011-07-05
- Maturity
- CERTIFIED
- License
- Apache License 2.0
Compatibility
- Framework
- Vaadin 6.6+
- Vaadin 6.5+ in 1.2.0
- Vaadin 6.0+ in 0.3.1
- Vaadin 6.4+ in 1.0.0
- Browser
- Internet Explorer
- Internet Explorer
- Internet Explorer
- Firefox
- Opera
- Safari
- Google Chrome
- Internet Explorer
Vaadin TreeTable - Vaadin Add-on Directory
A table implementation that supports displaying hierarchical structuresDemo: WorkLog app with one component
Demo: ImageBrowser lists directory on server containing images
Author Homepage
Issue Tracker
Vaadin TreeTable version 0.1
Initial release for testing and comments.
Vaadin TreeTable version 0.2.0
- package rename
- fixed issue with colunm icons
Vaadin TreeTable version 0.3.0
Bugixes + api to collapse/expand nodes via TreeTable
Vaadin TreeTable version 0.3.1
Bugixes + api to collapse/expand nodes via TreeTable. Needs 6.4 series build newer than changeset [13752]
Vaadin TreeTable version 0.4.0
* Note: Requires Vaadin 6.4.2 nightly build or newer. 0.3.1 supports all 6.4 builds.
* Scroll position now more stable when opening/collapsing nodes
* Improved keyboard navigation.
Vaadin TreeTable version 1.0.0
This is first stable release. From 0.4 several small issues were fixed + some API was renamed and documented.
Vaadin TreeTable version 1.1.0
Compatibility with Vaadin 6.5.0.pre1 (GWT 2.1.0) and later.
Please use version 1.0.0 for compatibility with Vaadin 6.4 branch (from version 6.4.6).
Vaadin TreeTable version 1.1.1
Fix for the problem where collapsed and expanded states were mixed up when Collapsible container impl was used
Vaadin TreeTable version 1.2.0
- setHierarchyColumn(Object) method
- supports IE9 and Firefox 4 when used with Vaadin 6.6 or later
- bugfixes
Vaadin TreeTable version 1.2.1
Fixed issues with keyboard navigation.
Vaadin TreeTable version 1.2.2
Fix: Item icon is now clickable to select row