Before you begin
Create a BTT Project for runtime code implementation.
Procedure
- Create a widget layout template in “\WebContent\js\com\ibm\btt\dijit\templates”.
- Create javascript file “CurrencyWidget.js” in runtime
project directory “\WebContent\js\com\ibm\btt\dijit\”, it includes
single widget loading, display, data layout and submit logic.
- Create javascript file “CurrencyColumnWidget.js” in runtime
project directory “\WebContent\js\com\ibm\btt\dijit\”, it includes
the widget loading, layout and sorting logic in table column.
- Create java file “src\com\ibm\btt\dojo\alphatest\tag\DojoCurrencyWidgetTag.java”,
it will handle the data submit logic in channel level.
- Create java file “src\com\ibm\btt\dojo\alphatest\tag\DojoCurrencyWidgetTableTag.java”,
it will handle the CurrencyWidget logic in table column.
- Update bttdojo.tld.
- Aadd new tag “currencywidget” below:
- Update column tag class as below:
- Update template, add two new javascript files:
- Prepare list file for widget as select data source, for
example:
- Prepare keyedcollection data which will binding to CurrencyWidget,
it should have two simple data element named “currency” and “amount”.