Implementing action

To implement action, do the following:
  1. Copy the CashDrawerWithdrawAction.java from <toolkit_root>\samples\BTTJumpStartSampleRCPClient.zip\ BTTJumpStartSampleRCPClient/src/com/ibm/btt/jumpstart/sample/action to com.ibm.btt.jumpstart.sample.action package of BTTJumpStartSampleRCPClient Project.
    1. The action is called when you click Withdraw. Following is the screen capture:

      Screen capture of the Cash Drawer

      The action’s invocation condition is set in BTT XUI configuration:

      Screen capture

    2. In widgetSelected() method, CashWithdrawDenoDialog dialog is opened.
    3. In CashDrawerWithdrawAction() method, a PropertyListener is added to listen withdraw event, which will be fired in CashWithdrawDenoDialog dialog. When withdraw button In CashWithdrawDenoDialog dialog is clicked, the event is fired.
    4. The handlePropertyChange method is called when the withdraw button in CashWithdrawDenoDialog is clicked.
    5. The following screen capture shows the withdraw details of the current CashWithdraw action:
      Screen capture of the Withdraw details
  2. Copy the QueryAccountInfoAction.java from <toolkit_root>\samples\BTTJumpStartSampleRCPClient.zip\ BTTJumpStartSampleRCPClient/src/com/ibm/btt/jumpstart/sample/action to com.ibm.btt.jumpstart.sample.action package of BTTJumpStartSampleRCPClient Project.
    1. The action is called when the mouse focus leaves the Account Number Text Field in the withdrawProc panel:

    2. The action gets customer information by withdrawQueryAcctClientOp, and passes the information to XUI by updating XUI data model.
  3. Copy the WithDrawXUIListener.java from <toolkit_root>\samples\BTTJumpStartSampleRCPClient.zip\ BTTJumpStartSampleRCPClient/src/com/ibm/btt/jumpstart/sample/action to com.ibm.btt.jumpstart.sample.action package of the BTTJumpStartSampleRCPClient Project.
    1. The action is called when the contents of Amount, Fee or Fee Discount are changed.
    2. The action updates the Real Amount field based on Amount, Fee or Fee Discount fields.
  4. Right-click the BTTJumpStartSampleRCPClient Project, and select New > package. In the dialog box that pops up, enter com.ibm.btt.jumpstart.sample.override in the Package field, and click Finish. Copy the OverrideAction.java from <toolkit_root>\samples\BTTJumpStartSampleRCPClient.zip\ BTTJumpStartSampleRCPClient/src/com/ibm/btt/jumpstart/sample/override to the com.ibm.btt.jumpstart.sample.override package of BTTJumpStartSampleRCPClient Project.
    Update import com.ibm.btt.jumpstart.sample.Activator to import com.ibm.btt.tools.aw.sample.Activator.
    1. The action is called when you click Submit in withdrawProc panel.
    2. The action calls the Override function in BTT business components, and tells whether Override is required or not. And it invokes Override when it is necessary.