Using JBuilder for StarTeam JavaBeans
While you can use any full featured Java development environment with StarTeam Extensions, the samples included were created with JBuilder Enterprise Edition. These samples may also be maintained with later releases of JBuilder.
To use the StarTeam JavaBeans in JBuilder you must configure your libraries and palette.
Configuring JBuilder to use StarTeam JavaBeans
To configure JBuilder for JavaBeans, do the following:
-
Configure the JBuilder libraries to include the starflow-extensions.jar, starteamxx.jar and guicomponents.jar files. User Home should now have subfolders named StarTeam Extensions, StarTeam, and GUI SDK.
- Click Tools > Configure Libraries from JBuilder’s menu bar.
-
Select the
User Home folder from the
Configure Libraries dialog box.
- Click New to create a StarTeam Extensions folder under the User Home folder that contains the starflow-extensions.jar and guicomponents.jar files. If you have a StarFlow folder under the User Home folder, you need to change it.
-
Enter
StarTeam Extensions
in the Name field in the New Library Wizard dialog box. -
Click
Add.
- On the Select One or More Directories dialog, select the starflowextensions.jar and guicomponents.jar files from the StarFlowExtensions\Projects folder at C:\config_name\StarFlow Extensions\Projects.
-
Click
OK until you return to the
Configure Libraries dialog box.
-
Click
Add.
-
Select the
User Home folder from the
Configure Libraries dialog box.
- Click New to create a StarTeam folder under the User Home folder that contains the starteamxx.jar file. If you have a StarGate folder under the User Home folder, you need to change it.
-
Enter
StarTeam
in the Name field in the New Library Wizard dialog box. -
Click
Add.
- On the Select One or More Directories dialog box, select the starteamxx.jar file (usually located at C:\Program Files\Micro Focus\ StarTeam SDK x.x\Lib\starteamxx.jar).
-
Click
OK until you return to the
Configure Libraries dialog box.
-
Select the
User Home folder from the
Configure Libraries dialog box.
- Click New to create a GUI SDK folder under the User Home folder that contains the starteam-gui.jar file.
-
Enter
GUI SDK
in the Name field on the New Library Wizard dialog. -
Click
Add.
- On the Select One or More Directories dialog, select the starteamgui.jar file from the StarFlowExtensions\Projects folder (for example, at C:\config_name\StarFlow Extensions\Projects).
-
Click
OK until you return to the
Configure Libraries dialog box.
User Home should now have subfolders named StarTeam Extensions, StarTeam, and GUI SDK.
-
Add a new palette by choosing Tools > Configure Palette from JBuilder’s menu bar.
- Click Add in the Palette Properties dialog box.
- On the
Add Page dialog box, enter
StarTeam Extensions
. - Click OK.
- Select StarTeam Extensions.
- Click Move Up until StarTeam Extensions is at the top of the list in this tab.
- Click the Add Components tab.
- Click Select Library.
- From the Select a Different Library dialog box, select the StarTeam Extensions library.
- Click OK.
- From the Palette Page list, select the StarTeam Extensions palette page.
- Click Add From Selected Library at the bottom of the dialog. As the JavaBeans are added, they are listed in the Results dialog box.
- Click OK, and you are ready to use the StarTeam JavaBean components.
- In JBuilder, open a sample project to be modified for use with StarTeam.
- Double-click the .java file to be modified.
- Click the Design tab. The StarTeam Extensions JavaBeans should appear on the StarTeam Extensions page of the toolbar.
Using JBuilder Personal Edition
JBuilder Personal does not include IDE-based support for building Jar files. Building the Jar file is a necessary step for use as an APE. For your convenience, we have included MakeitemtypeJar.bat in the base of each respective sample project. After you have compiled the project in JBuilder, you can run the batch file to create the Jar file, which will be placed in the Projects folder by default, where it will be ready for check in to the StarFlow Extensions project in the Projects folder. You may need to edit the batch file if JBuilder is not installed in the C:\jbuilderx folder.
Editing StarTeam APEs
You can add new fields to or edit the existing fields of a StarTeam Extensions form using your favorite Java development tool. These forms are called alternate property editors (APEs). When you use a StarTeam JavaBean component, you will need to select the correct component that matches the type of field you are using, and after the component is placed on the form, you will need to set the propertyName attribute. The propertyName attribute should have the application field name that you wish to display in this component in the form.
In design mode the label on the field will be the value found in the propertyName attribute of the JavaBean, but when executed the label will be the StarTeam Display Name for the field.
Where applicable, the JavaBeans are composed of an editor component and a text label showing the name of the property being edited. By default, the text shown by the label is the display name of the StarTeam property associated with the JavaBean (set via the propertyName JavaBean property). When you edit the JavaBean in a visual form designer such as JBuilder, the label's text will be the internal identifier for the property, that is, the value of the propertyName property of the JavaBean. When the form is run, that text is replaced with the display name of the property (defined by StarTeam metadata about the property). For example, the StarTeam Status field has the same display name and internal identifier. However, the custom status field used in the change request samples has the display name Workflow Status and the internal identifier Usr_StarFlowStatus. In the latter case, you see Usr_StarFlowStatus in JBuilder and Workflow Status when the form runs.
You can control the behavior of this label by doing any of the following:
Supplying alternate text for the label | Set the labelTextOverride property of the JavaBean. The text you supply will be seen in JBuilder and when the form runs. |
Turning the label off so that it is not seen at any time | Set the
showLabel property to
false . To turn the label back on later, you would set the
showLabel property to
true .
|