Account widget sample

The Account widget is a more complex than the ToggleButton widget, and it consists of two Label widgets and a SelectList widget. Figure 1 shows the sample Account widget.
Figure 1. Sample Account widget.
The sample Account widget.

When selecting an account number from a list, the balance of this account is displayed automatically. This composite widget can be reused in multiple scenarios, including account transferring and payment so that a functional developer does not need to create the three widgets and ECA rule for every scenario.

More advanced topics are covered in this sample. Listed below are tasks that are covered in this sample:
The implementation items of this sample are in two projects: AlphaSampleWidget project and Alphates_v8.0 project. Table 1 provides information on the implementation items that are included in the Account sample.
Table 1. Implementation items included in the Account sample.
Item name Description Related information Location
AccountWidget.xml Widget Definition file Defining a widget widget folder in AlphaSampleWidget project
AccountWidgetFigure.java Figure implementation of widget Displaying a widget in the XUI editor src/com/ibm/btt/alphasample/editor/figure/ folder in AlphaSampleWidget project
Account.gif Icon used to show Account widget in XUI Editor Palette Importing a widget icon folder in the AlphaSampleWidget project
AccountWidget.PNG Image used to show Account widget in XUI Editor Canvas Importing a widget image folder in AlphaSampleWidget project
ColorCellEditor.java; ColorPropertyDescriptor.java; SimpleColorPropertyDescriptor.java Color property editor implementation Customizing a property editor src/com/ibm/btt/alphasample/editor/properties/desc folder in AlphaSampleWidget project
Account widget extension point Extension point registration of Account widget Importing a widget Extensions tab of plugin.xml in the AlphaSampleWidget project
alphaMapping.xml Define widget mapping in the file Creating and registering widget mappings configure folder in the AlphaSampleWidget project
RGBValueRule.java Customize property mapping rule Creating a customized property mapping rule src/com/ibm/btt/alphasample/editor/generator in the AlphaSampleWidget project
DojoAccountTag.java JSP tag handler implementation for Account widget Implementing and registering a JSP tag handler src/com/ibm/btt/alphatest/dojo/tag folder in the Alphates_v8.0 project
bttdojo.tld JSP tag handler registration Implementing and registering a JSP tag handler WebContent/WEB-INF folder in the Alphates_v8.0 project
Account.js JavaScript implementation for Account widget Dijit implementation WebContent/js/com/ibm/btt/dijit folder in the Alphates_v8.0 project