Apama 10.15.0 | Building and Using Apama Dashboards | Building Dashboard Clients | Reusing Dashboard Components | Using Composite objects | Configuring Composite objects
 
Configuring Composite objects
The Composite object is in the Composite tab of the object palette.
Example of a Composite object
The Composite object is initialized to display one row of the same sample data as the Table object. The rtv file displayed contains three objects to show the city and unit statistics.
After adding a Composite object to a dashboard you need to specify the rtv file to display. The rtvName property is used to select the file.
Illustration showing how to specify the rtvName
Note: 
This rtv file must not itself contain any composite objects. You cannot nest composite objects.
When you select a file, the Composite object is redrawn in order to display the contents of the file.
Example of the redrawn Composite object
Note that the Composite object is resized to the size specified in the file being displayed. When you create the file, set its Background Properties to the desired size and color.
The property panel for the Composite object will update to show as properties all the variables defined in the selected file.
Illustration of the property panel
Here the labelColor, labelFont, and labelText variables are exposed as properties. Setting these you can change the appearance of the Composite object:
Illustration of the changed Composite object
Here the labelColor is set to red, the labelFont to SanSerif Bold and the labelText to the string Test.
Composite object properties that expose variables do not need to be set to static values. You can attach them to any data source, including a DataView. When so attached, a property's corresponding variable changes whenever the attached data changes. Properties in the rtv file that are attached to the exposed variables will update in turn. The following dashboard illustrates this:
Illustration of a dashboard
This dashboard consists of a table object showing all instances of the tutorial DataView and a Composite object containing a single label. This Composite object shows the current price of whatever instrument is selected in the table. Whenever the price changes the composite object updates to show the current price.
As in previous examples, the rtv file that is displayed in the composite has the variable labelText, which is exposed as a property on the Composite object. The label in the file is attached to labelText such that it will show its value. Rather than supplying a static value for the corresponding property labelText in the Composite object, this dashboard has labelText attached to the selected instance of the tutorial DataView.
By attaching the property to the DataView and filtering by $instanceId, the labelText property will update whenever the value of the attachment changes. When the labelText property changes, it will change the value of the corresponding variable in the rtv file displayed in the composite which will in turn be reflected in the label.