Make startup JS file

Create a JS file to init the BTT On-Demand Workplace Area. Take SampleInit.js in BTTWeb2InternetBankSample as an example.

First, it sets up the BTTConfig Object to BTTMain.BTTConfig. Then it calls the BTTMain.init() to initialize BTT On-Demand Workplace Area, and callsBTTMain.save()to trigger the saving process.

the default JS file to initialize and save the BTT On-Demand Workplace Area

Note: BTTMain.init(BTTConfig) will call _Init() as a callback function after the model for BTT Workplace Area is ready. The _Init() function is called to initialize the view component for BTT Workplace Area elements.

Put the SampleInit.js under the example folder, where the main page can find and include it.

the project structure

As some links in the main page can trigger the view component function, the SampleVO.js is used to bind the HTML event handler to the instance of the view component. Please see Web2 On-Demand Workplace Sample for reference.