442 IBM Branch Transformation Toolkit 5.1 Migration and Usage Guidelines
csClientService=((CSClientService)getService("CSClient"));//$NON-NLS-1$
setValueAt("permanentConnectionForEvents",(new
Boolean(csClientService.getPermanentConnectionForEvents())).toString());
setValueAt("ipAddress",Settings.getIpAddress());
setValueAt("eventsPort",new Integer(csClientService.getEventsPort()));
csClientService.sendAndWait(this,40000);
}
14.Externalize the client operation data by performing the following tasks:
a. Open the dseoper.xml file.
b. Create your client operation with the values shown in Example 8-39.
Example 8-39 withdrawalClientOperation
<operation context=”withdrawalClinetCtx”
id=”withdrawalClientOp”
impClass=”btt.bank.client.appl.WithdrawalClientOperation”
serrverOperation=”withdrawalServerOp”>
<refFormat name=”csRequestFormat” refId=”withdrawalCSRequestFmt”/>
</operation>
8.4.3 Creating Java client using VisualBeans
This section describes how to create a Java client view to launch the client
operation.
To construct the Java client view, use DSE VisualBeans and some standard
WebSphere Studio Application Developer visual parts such as Swing
components. Using Branch Transformation Toolkit VisualBeans in the
WebSphere Studio Application Developer environment requires a simple setup
to be in place beforehand.
This section first looks at setting up the visual composition environment, and then
at creating a Java View named WithdrawalView.
Setting up the WebSphere Studio environment
.To set up DSE VisualBeans environment, perform these tasks:
1. Open WebSphere Studio Application Developer.
2. Open the Java perspective and select BTTBankApplicationClient
appClientModule.
a. Select File Import ZIP file Next.
b. Import the DseGuiBeans.zip file located in the src directory of the visual
beans plug-in, that is, [drive]:\[WebSphere Studio Application
Running H/F 1 443
Developer_install_dir]\wstools\eclipse\plugins\com.ibm.dse.guibeans_5.1.
0\src).
c. Click Select All and then Finish, as shown in Figure 8-177.
Figure 8-177 Import DSEGuiBeans into BTTBankApplicationClient
d. Select the SPColorEditor.Java class in the com.ibm.dse.gui package.
Right-click SPColorEditor.Java and select Source Organize Imports.
Save and close.
3. The GUI beans have to access information from your client's initialization file.
Therefore, make sure that dse.ini is visible:
a. Open the BTTBankApplicationClient->appClinetModule project in the
settings.properties file.
444 IBM Branch Transformation Toolkit 5.1 Migration and Usage Guidelines
b. Check the DSEINIDevelopmentPath property. It must point to the dse.ini
file in your client project workspace, for example:
DSEINIDevelopmentPath =
[WORKSAPCE_DIR]\\BTTBankApplicationClient\\appClientModule\\dse.ini
c. Open the BTTBankApplicationClient project in the appClientModule
folder in the dse.ini file. Modify the entities property in your dse.ini file so
that your visual beans can access the proper externalized XML files, for
example:
<field id="entities" value=".\"/>
4. In the Java perspective, right-click the BTTBankApplicationClient project
and select Properties Java Build Path Libraries tab.
a. Click Add Library. This calls the Add library dialog box.
b. Select DSE VisualBeans.
See Figure 8-178.
Figure 8-178 Add DSE VisualBeans to application
c. Click Next. The new library of Visual Components is displayed as shown
in Figure 8-179 on page 445.
d. Click Finish.
Running H/F 1 445
Figure 8-179 Add Library
e. Click OK. The Add Library Wizard adds a container to the build path.
When the you open the Java Visual Editor, the categories defined in the
XMI file will be added at the top of the palette. You can then drop
JavaBeans into the visual canvas without having to use the VisualEditor's
Choose Bean dialog.
f. If there are any problems with your plug-in, such as not appearing in the
list of containers for the project, it may mean that errors have occurred in
the plug-in’s XML file. WebSphere Studio Application Developer writes
these errors in the [WebSphere Studio Application
Developer_install_dir]\workspace\.metadata\.log file.
Creating the operation view
This section describes how to create a Java view to launch the operation. To
perform the operation, you should provide some input data such as the branch
identifier, the account number, the operation date, and the amount. You should
446 IBM Branch Transformation Toolkit 5.1 Migration and Usage Guidelines
expect the new balance and a transaction error message or just the transaction
error message to be returned.
The view you create now will appear as shown in the Figure 8-180. It can be
personalized.
Figure 8-180 WithdrawalView

Get IBM Branch Transformation Toolkit 5.1 Migration and Usage Guidelines now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.