Variable

Palette category
Other
Palette bean
Variable
Project
None
Package
None
Type
None

Use a Variable bean to reference any instance of a particular class. A Variable is not a Java class, and is not an instance of the class it represents. Variable beans are commonly used to represent tear-off properties and objects from other composite beans.

Generally, when you add a bean to a composite bean, a single fixed instance of that bean is created. When you add a Variable bean, however, a bean instance is not created. Instead, you can make a connection to assign any bean instance of the type specified for the Variable. Connections to the Variable's features then operate on the assigned bean instance. If you assign another bean instance to the Variable, connections to the Variable's features operate on the newly assigned bean instance rather than on the previously assigned instance. The Variable bean serves as a reference for bean instances.


Related procedures
Dynamically Creating and Accessing a Bean Instance

Related references
Factory and Variable Beans
Beans for Visual Composition