To extend DataField, do the following:
- Create a class extending com.ibm.btt.base.DataField.
- In btt.xml, find the data section and add the following code to the classtable:
<field id="newDataField" value="package.NewDataField" />
- If your Transaction Editor is opened before you define the extensions,
right-click any blank space in the editor and select Reload BTT
Global Settings in the pop-up menu so that your changes can be
applied.
To extend iColl, do the following:
- Create a class extending com.ibm.btt.base.IndexedCollection.
- In btt.xml, find the data section and add the following code to the classtable:
<field id="newIColl" value="package.NewIColl" />
- If your Transaction Editor is opened before you define the extensions,
right-click any blank space in the editor and select Reload BTT
Global Settings in the pop-up menu so that your changes can be
applied.
To extend kColl, do the following:
- Create a class extending com.ibm.btt.base.KyedCollection.
- In btt.xml, find the data section and add the following code to the classtable:
<field id="newkColl" value="package.NewKColl" />
- If your Transaction Editor is opened before you define the extensions,
right-click any blank space in the editor and select Reload BTT
Global Settings in the pop-up menu so that your changes can be
applied.
To extend the property of data, add the following code:
import com.ibm.btt.annotation.ATTR;
@ATTR( { "newProperty1#String#REQUIRED","newProperty2#String#IMPLIED"})
where:
- newProperty1 is the property name;
- String is the property type;
- REQUIRED refers to if the property is required or implied.
- By default, the properties of the parent class are extended. If you do
not want to extend the properties of the parent class, you can add the configuration
as follows: @EXTEND("no").