IBM WebSphere Multichannel Bank Transformation Toolkit, Version 7.1

ToggleButton widget sample

The ToggleButton widget is a very simple widget. onText is displayed on the button by default. When it is clicked, offText is displayed on the button. Meanwhile, the onClick event is added to the widget so that when the button is clicked, the onClick event is triggered.

Although the ToggleButton widget it is a simple example, more complex widget extension tasks are also covered in the example to enable technical developers who have an overall understanding of WebSphere® Multichannel Bank Transformation Toolkit extend widgets quickly. Listed below are tasks that are covered in this sample:
The implementation items of this sample are in two projects: AlphaSampleWidget project and Alphates_v7.1 project. Table 1 provides information on the implementation items that are included in the ToggleButton sample.
Table 1. Implementation items included in the ToggleButton sample.
Item name Description Related information Location
ToggleButton.xml Widget Definition file Defining a widget Widget folder in AlphaSampleWidget project
ToggleButton.PNG Icon used to show ToggleButton in XUI Editor Palette Importing a widget Icon folder in AlphaSampleWidget project
ToggleButton widget extension point Extension point registration of ToggleButton 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 AlphaSampleWidget project
DojoToggleButtonTag.java JSP tag handler implementation for the widget Implementing and registering a JSP tag handler src/com/ibm/btt/alphatest/dojo/tag folder in Alphates_v7.1 project
New tag element section in bttdojo.tld JSP tag handler registration Implementing and registering a JSP tag handler WebContent/WEB-INF folder in the Alphates_v7.1 project
ToggleButton.js JavaScript implementation for the widget Dijit implementation WebContent/js/com/ibm/btt/dijit folder in the Alphates_v7.1 project


Feedback