Developing Apama Applications > Building Dashboards > Reusing Dashboard Components > Working with multiple display panels > Using tree controls in panel displays > Creating tree controls
Creating tree controls
The input of tabular data determines the content of the tree control, as well as the appearance of each object in the tree. As with other controls, to configure a drill-down, set substitutions, or execute a command when a user clicks a tree node, use the actionCommand property. As with other table-driven objects, the drillDownColumnSubs property can be configured to set substitutions to column values from the row in the table (attached to the valueTable property) that corresponds to the selected tree node.
After you attach your tabular data to the tree control valueTable property, specify the table format for the tree in the valueTableFormat property. The table format is determined by the format of the table you attach to the valueTable property. There are two table format options, each with their own requirements:
*Row-leaf: This format is intended for use when the valueTable property is attached to a table and all leaves in the tree are at the same depth. For example, where the tree control is attached to a scenario instance table. The nodeIndexColumnNames property specifes the columns from the scenario instance table that will appear in the heirarchy in the tree control.
*Row-node: If the row-leaf format is not suitable for your data, use the row-node format. Your data table must also contain a row for each node in the tree, including the top-level node (rather than just the leaf nodes, as with the row-leaf format), as well as a column for the node and a column for the parent node. The row-node format allows each leaf of the tree to have a different depth.
The default table format is row-leaf. The following are examples of the row-leaf and row-node table formats, which both produce the tree in the image that follows. Here is a row-leaf table:
App Name
PID
App0
1000
App0
1004
App0
1008
App1
1001
App1
1005
Here is a row-node table:
Node
Parent
app0
1000
app0
1004
app0
1008
app0
app1
1001
app1
1005
app1
Here is the tree control that both these tables produce:
After you configure the tree table format, you can optionally configure the tree control icons. See Configuring tree control icons.
Copyright © 2013 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or Terracotta Inc., San Francisco, CA, USA, and/or Software AG (Canada) Inc., Cambridge, Ontario, Canada, and/or, Software AG (UK) Ltd., Derby, United Kingdom, and/or Software A.G. (Israel) Ltd., Or-Yehuda, Israel and/or their licensors.