Creating the JavaScript Dojo widget
Keep the following guidelines in mind when you create the Dojo widget for the user interface (UI) action.
- Development environment requirements
Use a development environment such as Eclipse to create the JavaScript dojo module. Include any supporting files, such as CSS files or image files.
- Module name requirements
- Be sure to use the same module name that was used to define the action's moduleName property.
- Web application (WAR) requirements
The module must be packaged in a web application (WAR) which is in an enterprise application (EAR). The development environment can help you create the application packages.
Always create your own web application or enterprise application. Never put custom code into an existing ICFM module.
- Workflow action requirements
The actions must extend from cfm/actions/_StateAction.
Be sure to provide an onClick: function(). This function is a callback function to handle when the user clicks the action.
To query the selected investigation IDs, call this.getSelectedFolioIds().
- More Actions action requirements
The actions must extend from cfm/actions/_TaskAction.
Be sure to provide an onClick: function(). This function is a callback function to handle when the user clicks the action.
For actions where the includeOn value is set to inbox or details, the action is automatically enabled when an investigation is selected and is disabled when no investigations are selected. To override this behavior, provide an onChange_selectedFolios: function(folio) function that does not call this.inherited(arguments). That is, the function does nothing.
To query the selected investigations (not just the IDs), provide an onChange_selectedFolios: function(folios) function. The folios parameter is an array of investigation objects.
Menu action requirementsThe actions must extend from cfm/actions/_PageAction.
Be sure to provide an onClick: function(). This function is a callback function to handle when the user clicks the action.
Menu actions are not required to query the selected investigations.- Taskbar action requirements
These actions must extend from cfm/actions/_PageDockAction.
Provide a buildFlyoutContent: function() function to build the Task flyout pane content. Within this function, use this.flyoutCenterPane as the container for the Task flyout pane content. That is, within the buildFlyoutContent function, create the UI widgets and add them to this.flyoutCenterPane.
Taskbar actions are not required to query the selected investigations.
- View switcher action requirements
These actions must extend from cfm/actions/_ViewAction.
Set field this.view to be the widget that is displayed when the user clicks the action. Usually, this widget is an instance of dijit/layout/ContentPane.
To add the view to the View switcher, call topic.publish("/ibm/cfm/alertdetails/addview", {view: this.view});.
Be sure to provide an onClick: function(). This function is a callback function to handle when the user clicks the action.
To query the selected investigation, subscribe to a dojo topic by using topic.subscribe("/ibm/cfm/alertdetails/folio/loaded", lang.hitch(this, function(folioId) { }));
To query the selected investigation IDs, call this.getSelectedFolioIds().