background image

Class Methods

<< The Classes and Their Relationships | Account History Screen >>
<< The Classes and Their Relationships | Account History Screen >>

Class Methods

Class Methods
The BankAdmin class provides methods that other objects call when they need to update the user
interface. These methods are as follows:
setCustomerTextFields
: When true enables the user to enter or change information in the
customer tab. When false, the fields are disabled.
fillCustomerTextFields
: Uses a CustomerDetails object to display customer
information in the customer tab
clearCustomerTextFields
: Clears the contents of the customer fields in the customer tab
setAccountTextFields
: When true enables the user to enter or change information in the
account tab. When false, the fields are disabled.
fillAccountTextFields
: Uses an AccountDetails object to display account information
in the account tab
clearAccountTextFields
: Clears the contents of the account fields in the account tab
resetAll
: Calls setCustomerTextFields and setAccountFields, setting all the fields to
disabled
The following methods interact with the controller session beans to create and update customer
and account information:
createAccount
: uses an AccountDetails object to create a new account
updateAccount
: uses an AccountDetails object to update an account information
createCustomer
: uses a CustomerDetails object to create a new customer
updateCustomer
: uses a CustomerDetails object to update a customer's information
The UI-elementMouseReleased methods are linked to the GUI controls in BankAdmin. They call
the previous methods to enable/disable the GUI fields, and create/update accounts and
customers.
Web Client
In the Duke's Bank application, the web client is used by customers to access account
information and perform operations on accounts.
Table 37­2
lists the functions the client
supports, the JSP pages the customer uses to perform the functions, and the backing beans ad
other JavaBeans components that implement the functions.
Note ­
The source code for the web client is in the
tut-install/javaeetutorial5/examples/dukesbank/dukesbank-war/ directory.
Web Client
The Java EE 5 Tutorial · September 2007
1066