The BTTCoordinatedComp is an abstract class that is a container for the
toolkit visual beans. It is a non-visual bean that provides the following
features and functions:
- This bean does not have its own model, but you can extend from a BTTCoordinatedComp
and then add support for a context (data model). (See Creating a coordinated
composite.)
- The operation composite and context composite both extend the BTTCoordinatedComp.
This gives them common properties but each behaves according to its own data
model (operation or context).
- When you use a BTTCoordinatedComp, it is not necessary to make connections
in the Visual Editor for Java™. A BTTCoordinatedComp bean has a list
of data exchangers (that is, beans that contain data, such as BTTTextField,
BTTCheckBox, BTTButtonGroup, BTTComboBox, or BTTLabel). Their data is linked
with data in the model. When any of them changes its value, the BTTCoordinatedComp
is responsible for updating the model data with this new value. Similarly,
when an Operation updates the model during its execution and fires an OperationRepliedEvent,
the BTTCoordinatedComp is responsible for refreshing the data exchangers in
the view with the new values. The consistency between the model and the view
can be guaranteed only in the direction that is specified as the dataDirection
value of the dataExchangers property.
- It decides when the OK button (and Execute buttons) must be enabled, based
on values from mandatory fields, data with no errors, and global validations.
The bean will execute the "String[] xValidate()" method of the default operation
to validate the operation input data before it attempts to execute the operation.
If this validation fails (returns something other than null), it will not
execute the operation but will show error messages.
- It is responsible for going through all the data exchangers in the view
to determine which are euro-convertible, so that the appropriate conversion
is done when the Euro or the EMUCurrency button is clicked.
- Any view developed using the toolkit visual beans must have a BTTCoordinatedComp
class as an external composite.
- It implements the behavior that is initiated by clicking on the Repeat
and Clear buttons.
- A coordinated composite will work with a DSECoordinationEvent in these
situations:
Table 1. Behavior of BTTCoordinatedCompSituation |
Event name suffix |
Action |
Receives a "Navigation" or "Action" type event from a child bean |
Name is unchanged |
Propagate |
Composite is opened. |
".viewOpened" |
Fire |
Composite is made visible. |
".viewVisible" |
Fire |
Composite is made not visible. |
".viewNotVisible" |
Fire |
An "OperationReplyEvent" occurs. |
".operationReply" |
Fire |
Composite is closed using the close() method or in response to receiving
an event of type "Close". |
".viewClosed" |
Fire |
Note: The full event name fired by the composite will be the event name suffix
appended to the composite name. To retrieve the composite name, use the composite's
getName() method.
For more information on the methods that must be implemented to use this
abstract class, see BTTCoordinatedComp.
The OperationComposite and BTTComposite extend this abstract class.
See Coordinated Composite interface description and Coordinated Composite
event consumption.