Extending in Runtime

Before you begin

Create a BTT Project for runtime code implementation.

Procedure

  1. Create a widget layout template in “\WebContent\js\com\ibm\btt\dijit\templates”.
  2. 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.
  3. 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.
  4. Create java file “src\com\ibm\btt\dojo\alphatest\tag\DojoCurrencyWidgetTag.java”, it will handle the data submit logic in channel level.
  5. Create java file “src\com\ibm\btt\dojo\alphatest\tag\DojoCurrencyWidgetTableTag.java”, it will handle the CurrencyWidget logic in table column.
  6. Update bttdojo.tld.
    1. Aadd new tag “currencywidget” below:
    2. Update column tag class as below:
  7. Update template, add two new javascript files:
  8. Prepare list file for widget as select data source, for example:
  9. Prepare keyedcollection data which will binding to CurrencyWidget, it should have two simple data element named “currency” and “amount”.