beautypg.com

Wiring the joltbeans together, Figure 3-10 – HP NonStop G-Series User Manual

Page 196

background image

Wiring the JoltBeans Together

After all of the beans are positioned on your form and the properties are set, wire the events together. Save, compile, and run the applet.

Figure 3-9

gives an example of the flow to help you determine the order when you are ready to wire the beans.

Wiring the beans allows you to establish event source-listener relationships between various beans of the form. For example, the
JoltServiceBean is a listener of ActionEvents from the button and invokes callService() when the event is received. The development
environment provides a tool (in this example, Visual Café Interaction Wizard) to wire beans together. In the absence of this tool, the event
source-listener pairs are implemented manually.

For more information, refer to

Figure 3-9

and the accompanying steps.

Figure 3-9. Example of How the Form Runs

1. Wire the JoltSessionBean logon

The results of completing these two steps will enable the logon() method of the JoltSessionBean to be triggered by an applet (e.g.,
ComponentShown) that is sent when the applet is opened for the first time.

Select the Interaction Wizard button. Click in the applet window (not on another bean) and drag a line to the JoltSessionBean. The
Interaction Wizard window similar to the example shown in

Figure 3-10

displays.

1.

Figure 3-10. Visual Café Interaction Wizard (Window 1 of 2)