Developing Apama Applications > Building Dashboards > Reusing Dashboard Components > Using Composite objects > Creating files to display in composite objects
Creating files to display in composite objects
While the Composite object can display any rtv file, reusable rtv files are typically parameterized. When you select the rtv for display in a Composite object, the Composite object will expose as properties all the variables defined in the rtv file. These variables are the parameters to the file, and can be set as needed for each use of the file.
As a simple illustration consider an rtv file with a single label object, where you want the text of the label, its color, and its font to be configurable whenever the file is used in a Composite object.
To do this, define variables in the rtv file for each of these properties, such as the following:
*labelText
*labelColor
*labelFont
In the properties panel, attach the label, labelTextColor, and labelTextFont properties of the label object to these variables.
When you use these variables in a Composite object, you’ll be able to set values for each in order to configure the appearance of the label.
When you edit properties of a Composite object, the property panel attempts to display the appropriate editor based on the name of the variable. Therefore, when you name variables for fonts and colors, end them with Font or Color, for example labelColor.
Variables that will be used for tabular data must have the data type Table.
When you define a variable, if you do not want to expose it as a property in a Composite object, uncheck the Public attribute of the variable in the Variables panel.
Note: Substitutions defined in an rtv file are not exposed as properties when the file is used in a Composite object. Variables that you want exposed as properties cannot be defined as substitutions, hence they can’t start with a $.
Note: Variable names cannot conflict with the names of properties of the Composite object; variables whose names conflict with Composite-object property names will not be exposed as properties. For example, you cannot have a variable label in a file displayed in a composite. The name conflicts with the label property of the Composite object.
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.