Running H/F 1 453
– Set the DSE_formatter to FloatFormatter. Inside the DataFormatter
attribute specifications, set the appropriate error message you want the
system to display when a validation error occurs. You can also set the
default thousands/decimal separators.
8. Add a javax.swing.JLabel for the previous SpTextField. Change the text
property to Amount:.
9. Add a SpLabel to represent the new balance after performing the operation.
– Change the name to vbAccountBalance.
– Set the DSE_dataName attribute to AccountBalance.
10.Add a javax.swing.JLabel for the previous SpLabel. Change the text
property to Balance:.
11.Add a com.ibm.dse.gui.SpErrorList to the OperationPanel. Change the
beanName to vbErrorList. This bean will display validation errors during the
data input process that occurs in any of the OperationPanel components,
including withdrawal validation class messages. Make sure your error list is
large enough to display long messages. Multiple error messages can be
displayed.
12.Add a javax.swing.JLabel for the previous SpErrorList. Change the text
property to Error messages:.
13.Add an SpButton.
– Change the beanName name to vbWithdrawal.
– Set the text attribute to OK.
– Set the DSE_type to OK. When you click OK, it executes the withdrawal
operation.
14.Save the bean and run it. Although the view does not really do anything at this
point, notice that when the mandatory fields are missing or when the formats
are not correct, OK is disabled.
15.Add another SpButton.
– Change the beanName to vbClose.
– Set the text attribute to Close.
– Set the DSE_type to Close. When you click Close, it will close the
operation view.
16.A summary of the VisualBeans to be added to your view is shown in Table 8-8
and Table 8-9.
Table 8-8 DSE components
DSE visual beans Properties
SpLabel beanName:vbCustomerName
DSE_dataName:CustomerName