This section provides information on the following NodeTemplate
elements:
NodePanel
s act as containers for other elements and can nest within each other. The NodePanel
default constructor centers elements horizontally across the panel. You can also choose to specify a vertical arrangement for a top-to-bottom placing of elements. When you add node elements to a panel, the add-on draws the elements in order of inclusion. This behavior establishes the Z-ordering of the elements.
You can use NodeTextBlock
to display text on a node. The textAlign
property specifies where the add-on draws the characters horizontally within the text block. The setBindingText()
method can set text using a:
Simple String as an argument: setBindingText("Bob Smith")
.
Field path to pass data from a specific field: setBindingText("${/employee_name}")
.
Custom URL based on node data. To leverage this functionality, you can create a class that implements NodeValueRenderer
and pass it to setBindingText(NodeValueRenderer action)
. See Using a node value renderer for more information.
You can use the NodeImage
class to display images in nodes. Its properties allow you to give exact dimensions for the image. Additionally, you can use the imageStretch
property to automatically fit the image to its boundaries. The setBindingSource()
method can set the image source in the following ways:
If the image URL is a simple String, you can pass the string as an argument. For example: image.setBindingSource("/addon/www/common/images/icons/avatar.jpg")
If you want to use an image stored in a media field managed by the TIBCO EBX® Digital Asset Manager Add-on, pass the field path. For example: image.setBindingSource("${/picture/attachment}")
To use a custom URL based on node data, you can create a class that implements NodeValueRenderer
and pass this information. For example: image.setBindingSource(new SourcePictureRendererImpForEmployee2())
You can add a node indicator icon by using NodeIndicator
. Each node template should have only one indicator. The add-on determines display behavior based on availability of node expansion.
Use NodeExpanderButton
to display a button on the node that collapses and expands given elements. Pass the target using setTargetElement(NodeElement targetElement)
. If the targetElement
is a panel, it must not contain the current expand button.
A node can use a table to organize data using rows and columns. You input the number of columns and add cell data on a row by row basis using addRowData()
. Data can be added as follows:
A constant String: addRowData("Name")
A field value using its path: addRowData("${/group/label}"
A combination of the above: addRowData("Name: ${/group/label})