Chapter 18. ATM Application Using Servlets 357
• If the PIN is correct, we pass control to the account servlet. Add a bean
of type AccountView (
4). Connect the pinCheckedOk event to the
transferToServiceHandler method and pass the this of AccountView as
a parameter (
5).
• If the PIN is incorrect, we set an error message and return to the pin
servlet. Connect the pinCheckedNotOk event (of the application
controller) to the messageText property of PinView with the text PIN
invalid, please reenter! (
6) Connect the pinCheckedNotOk to the
transferToServiceHandler method with the this of PinView as a
parameter (
7).
❑ When the Cancel button is clicked (in PinView) we return to the card
servlet. Connect the cancelButtonPressed event to the
transferToServiceHa ...