Step 3: Wire the accountID JoltTextField as Input to the JoltServiceBean Using JoltInputEvent

  1. Click the Interaction Wizard icon in the Visual Café Form Designer window.
  2. Select the accountID JoltTextField bean and drag a line to the JoltServiceBean.

    The Interaction Wizard window is displayed, as shown in the following figure, with the prompt:

    What event in accountId do you want to start the interaction?

  3. Select dataChanged as the event, as shown in the following figure.

    Figure 5-18 Select dataChanged Event

    Select dataChanged Event Diagram
  4. Click Next.

    The Interaction Wizard window is displayed as shown in the following figure, with the prompt:

    What do you want to happen when accountId fires dataChanged event?

  5. Select the joltServiceBean inquiry as the object supplying the parameter, as shown in the following figure
  6. Select Handle a jolt input event as the action, also as shown in the following figure.

    Figure 5-19 Select inquiry Object and Handle a Jolt input event Action

    Select inquiry Object and Handle a Jolt input event Action Diagram
  7. Click Next.

    The Interaction Wizard window is displayed as shown in “Select accountId Object and Get the current Jolt Input Event Action”, with the prompt:

    How do you want to supply the parameter to this method?

    and a list of available objects and actions from which to choose.

  8. Select accountId as the object, as shown in the following figure.
  9. Select get the current Jolt Input Event as the action, also as shown in the following figure.

    Figure 5-20 Select accountId Object and Get the current Jolt Input Event Action

    Select accountId Object and Get the current Jolt Input Event Action Diagram
  10. Click Finish.

Completing “Step 3: Wire the accountID JoltTextField as Input to the JoltServiceBean Using JoltInputEvent” enables you to type the account number in the first text field. The JoltFieldName property of this JoltTextField is set to “ACCOUNT_ID”. Whenever the text inside this text box changes, it sends a JoltInputEvent to the JoltServiceBean. (The JoltServiceBean listens to JoltInputEvents from this text box.) The JoltInputEvent object contains the name, value, and occurrence index of the field.