Rename your list view JavaScript click event functions to prevent namespace collisions
Summary
This article applies to Process Commander V4.2SP6 and later releases.
On the Format tab of the the List View form, you can identify JavaScript functions that define user interactions available from rows of the report display, such as a single-click or double-click.
The standard HTML fragment rule ListViewSelectorScript provides JavaScript functions that are available without special JavaScript coding. However, these may not meet your needs in all cases.
The JavaScript functions you create must have distinct names from those in the standard fragment rule. Reference your fragment rule and your functions on the Format tab.
Suggested Approach
If you create similar functions based on the standard, out-of-the-box functions for the ListViewSelectorScript, you must rename them to names that differ from the names in the standard rule.. If you do not rename your custom click events for list views, the standard, out-of-the-box functions prevail under certain conditions. User will not see your application's click event behavior in the list view displays.
The standard, out-of-the-box functions are most likely to override your custom functions when users navigate to screens with list view displays in this sequence:
- Navigate to a page with a list view that uses a custom function
- Navigate to a page with a list view that uses a standard function
- Navigate back to the page with the list view that uses the custom function
The example shows how to create a custom doSingleClick function. Follow this example for any ListViewSelectorScript function that you customize.
The API Package: ListView Scripts contains the click event functions:
- doDoubleClick
- doOpen Assignment
- doOpenWorkItem
- doSingleClick
Example
- Customize the standard doSingleClick function to extend it. For example, the function also fires an AJAX call.
- Rename your custom function to doAjaxSingleClick in the file
MyListViewScript
. Update the Format tab of the list view to reference your fragment, and your function, as in this example: