Class orion.treetable.TableTree
Generates an HTML table where one of the columns is indented according to depth of children.
Clients must supply a model that generates children items, and a renderer can be supplied which generates the HTML table row for each child. Custom rendering allows clients to use checkboxes, images, links, etc. to describe each element in the tree. Renderers handle all clicks and other behavior via their supplied row content.
The table tree parent can be specified by id or DOM node.
The tree provides API for the client to programmatically expand and collapse nodes, based on the client renderer's definition of how that is done (click on icon, etc.). The tree will manage the hiding and showing of child DOM elements and proper indent
The model must implement:- getRoot(onItem)
- getChildren(parentItem, onComplete)
- getId(item) // must be a valid DOM id
- initTable(tableNode) // set up table attributes and a header if desired
- render(item, tr) // generate tds for the row
- labelColumnIndex() // 0 based index of which td contains the primary label which will be indented
- rowsChanged // optional, perform any work (such as styling) that should happen after the row content changes
Defined in: </shared/eclipse/e4/orion/I201107200200/plugins/org.eclipse.orion.client.core/web/orion/treetable.js>.
Constructor Attributes | Constructor Name and Description |
---|---|
orion.treetable.TableTree(options)
Constructs a new TableTree with the given options.
|
Method Attributes | Method Name and Description |
---|---|
collapse(itemOrId)
|
|
expand(itemOrId, postExpandFunc, args)
|
|
getItem(itemOrId)
|
|
isExpanded(id)
|
|
refresh(item, children, forceExpand, imgName, imageSrc)
|
|
refreshAndExpand(item, children, imgName, image)
|
|
toggle(id, imgName, expandedImage, collapsedImage)
|
- Parameters:
- options
- Parameters:
- itemOrId
- Parameters:
- itemOrId
- postExpandFunc
- args
- Parameters:
- itemOrId
- Parameters:
- id
- Parameters:
- item
- children
- forceExpand
- imgName
- imageSrc
- Parameters:
- item
- children
- imgName
- image
- Parameters:
- id
- imgName
- expandedImage
- collapsedImage