Overview | Library | Tag | Help
| FRAMES NO FRAMES

## ICEfaces EE Composite Components
Tag dragAndDropTreeTable

## The Drag and Drop Tree Table Composite Component

Renders a tabular version of a tree model where node can be re-positioning in the tree, by being dragged to other branches

### 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 color-coding according to the level in the TreeModel
- Tree nodes can be dragged by clicking and dragging the folder or page icon to another folder
  - Click and hold on an icon
  - Drag the icon to onto another folder
  - The backing TreeModel will be automatically updated with the new structure

### How To Use

1. Create an instance of the TreeTable class in your managed bean
2. Create the tree model from TreeTableNode objects
3. Use the dragAndDropTreeTable tag on your page. Nest <ice-cc:css/> in your page <head> tag.
4. Set the 'bean' attribute on the tag
5. Add as many treeTableColumns as you would like in your table
6. For each treeTableColumn you may use any other component and reference row-level properties through the 'row' variable name

Example:

    <ice-cc:dragAndDropTreeTable 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:dragAndDropTreeTable>

Tag Information
Tag Class | javax.faces.webapp.FacetTag
TagExtraInfo Class | None
Body Content | tagdependent
Display Name | Drag and Drop 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
closeImage | false | false | `java.lang.String` | Passed through to ice:commandButton component
openImage | false | false | `java.lang.String` | Passed through to ice:commandButton component
effect | false | false | `com.icesoft.faces.context.effects.Effect` | The Javascript Effect
styleContainer | false | false | `java.lang.String` | Passed through to style attribute on ice:panelGroup component containing content
styleClassContainer | false | false | `java.lang.String` | Passed through to styleClass attribute on ice:panelGroup component containing content

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.