TreeTable

A tree displayed in a table. Clicking on the tree structre allows hide/display of tree levels.

After building the tree structure in code (which each node an instance of "org.equanda.tapestry5.data.Tree") this table is rendered as a HTML table with the structure deisplayed in the first column.
You can choose the number of levels of the tree which are unfolded on page load (0 is root only, 1 is one level unfolded, ...).

You have to pass the title and content panes for each of the columns in the table. There is currently a limitation of fifty columns. Only panels which have both a title and content parameter block are displayed, however the indexes do not need to be sequential (hence the need for a limit).


<table t:type="equanda/TreeTable" t:tree="tree" t:value="node" unfoldLevel="2">
<t:parameter name="title1">Region</t:parameter>
<t:parameter name="content1">${node.label}</t:parameter>
<t:parameter name="title2">Capital</t:parameter>
<t:parameter name="content2">${node.capital}</t:parameter>
<t:parameter name="title3">Inhabitants</t:parameter>
<t:parameter name="content3">${node.inhabitants}</t:parameter>
</table>
  • 1. TreeTable