The 401(k) demo has the following phases:
Before running the demo, you must perform certain tasks to set up your computer. Tasks performed during the setting up phase include:
The first phase, aggregation, shows an aggregate bean being formed by connecting the following beans:
AccountID bean | An input bean that allows the user to specify an account number. |
b401kDap bean | A Data Access Part bean that simulates a connection to a database of 401(k) account information. |
b401kViewer bean | A viewer bean that displays 401(k) account information that the b401kDap bean retrieved from the database. This bean additionally updates account information when the user modifies the percentage of funds allocated to the various investment options. |
These beans are connected as follows:
For this demo, the database lookup table is simulated. If the user updates the information being displayed by the b401kViewer bean
In summary, there are the following event connections:
During this phase, a Chart bean is added to the aggregate bean. The Chart bean is used to graphically display the account information. Scripting is used to connect the b401kDap bean to the Chart bean. Each time the b401kDap bean retrieves or updates the account information from the database, the Chart bean updates the display.
Scripting is used, instead of direct event connections, because the Chart bean is a third-party bean whose interface is not plug-compatible with the b401kDap bean.
During this phase, the AccountID bean is morphed to be a subclass of the original bean which also implements the Dippable interface. This morphed Account ID bean is then dipped into a SessionAuthentication bean. As a result of using the Sessions Authentication dip on the morphed AccountID bean, a floating dialog is displayed when the applet is started. This floating dialog contains fields in which the user must specify a user ID and password.
During this phase, the demonstration computer is returned to its original state by restoring key files. After the cleanup phase, the computer is ready to perform the 401(k) demo again or to perform another demo.