Overview | Library | Tag | Help
| FRAMES NO FRAMES

## ICEfaces EE Composite Components
Tag treeTable

## The Tree Table Composite Component

### Renders a tabular version of a tree model

### Features

- The Tree Table is driven by standard Swing TreeModel
- The Tree Table nodes can be expanded and collapsed by clicking on the folder icons
- Dynamic changes to the TreeModel and automatically shown in the Tree Table
- Tree Tables rows display colour-coding according to the level in the TreeModel

### How To Use

1. Create an instance of the TreeTable class in your managed bean
2. Create the tree model from TreeTableNode objects
3. Add the <ice-cc:treeTable/> tag to your page. Nest <ice-cc:css/> in your page <head> tag.
4. Bind the 'bean' attribute to your TreeTable bean
5. Add <ice-cc:treeTableColumn/>s for each column you would like in your table
6. In each <ice-cc:treeTableColumn/> use any other component and reference row-level properties through the 'row' variable name

Example:

    <ice-cc:treeTable bean="#{treeTableExampleBean.treeTable}" columnWidths="100px,80px,60px,50px,120px,6S0px,80px" levelColors="#FFE900,#FFF04F,#FFF79F,#FFFCDF"> <ice-cc:treeTableColumn header="Organization"> <ice:outputText value="#{row.data}" rendered="#{row.level eq 0}"/> </ice-cc:treeTableColumn> <ice-cc:treeTableColumn header="Region"> <ice:outputText value="#{row.data}" rendered="#{row.level eq 1}"/> </ice-cc:treeTableColumn> <ice-cc:treeTableColumn header="City"> <ice:outputText value="#{row.data}" rendered="#{row.level eq 2}"/> </ice-cc:treeTableColumn> <ice-cc:treeTableColumn header="Name"> <ice:outputText value="#{row.data}" rendered="#{row.data.class.simpleName eq 'Employee'}"/> </ice-cc:treeTableColumn> <ice-cc:treeTableColumn header="Phone"> <ice:outputText value="#{row.data.phone}" rendered="#{row.data.class.simpleName eq 'Employee'}"/> </ice-cc:treeTableColumn> <ice-cc:treeTableColumn header="Born"> <ice:outputText value="#{row.data.birthDate}" rendered="#{row.data.class.simpleName eq 'Employee'}"> <f:convertDateTime dateStyle="medium"/> </ice:outputText> </ice-cc:treeTableColumn> </ice-cc:treeTable>

Tag Information
Tag Class | javax.faces.webapp.FacetTag
TagExtraInfo Class | None
Body Content | tagdependent
Display Name | Tree Table Composite Component

Attributes
Name | Required | Request-time | Type | Description
bean | true | false | `com.icesoft.faces.facelets.component.treetable.TreeTable` | The bean attribute must resolve to an instance of the TreeTable class.
columnWidths | false | false | `java.lang.String` | A comma-delimited list of px-based widths for each column in the table
levelColors | false | false | `java.lang.String` | A comma-delimited list of color codes for each level in the tree
lineImage | false | false | `java.lang.String` | Passed through to ice:graphicImage component
nodeImage | false | false | `java.lang.String` | Passed through to ice:graphicImage component

Variables
| No Variables Defined.

Overview | Library | Tag | Help
| FRAMES NO FRAMES

Output Generated by Tag Library Documentation Generator. Java, JSP, and JavaServer Pages are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries. Copyright 2002-4 Sun Microsystems, Inc. 4150 Network Circle Santa Clara, CA 95054, U.S.A. All Rights Reserved.