IBM BPM, V8.0.1, All platforms > Create processes in IBM Process Designer > Create user interfaces for business processes > Developing reusable Coach Views
Defining Coach View behavior
In the Behavior page, you can include reusable scripts or add inline JavaScript or CSS code to the Coach View. You can also define events.
Define the behavior for the Coach View in the Behavior page.
- Add existing script files from the library using Included Scripts and CSS code and JavaScript to the Coach View definition using Inline CSS and Inline JavaScript. In general, use included scripts for reusable code and the inline options for JavaScript and CSS code that is not reusable.
- For .css files, you can specify whether to include or exclude styles for Microsoft Internet Explorer or for the media type.
- If you are using JavaScript calls inside HREF <a></a> tags, make sure you catch and handle events properly. JavaScript onclick events should end with "return false;". If you use dojo.connect events, use dojo.stopEvent(e);. Otherwise you may experience problems with browser connection, for example connections to IBM Sametime may close prematurely.
If your Coach View requires modules that are written in the AMD (Asynchronous Module Definition) style, register the dependent modules using AMD dependencies.
- To insert code like <meta> tags into the header of the Coach View, use Header HTML.
- If necessary, define the functions used by the Coach View in the appropriate event handlers.
- If you selected Can Fire a Boundary Event in the Overview page, add code to fire the boundary events. To fire the event, code the JavaScript to call this.context.trigger(callback) at the appropriate time.
Developing reusable Coach Views
Related tasks:
Developing reusable Coach Views