Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

This content has been archived and is no longer being updated.

Links may not function; however, this content may be relevant to outdated versions of the product.

Rename your list view JavaScript click event functions to prevent namespace collisions

Updated on September 20, 2019

 

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:

  1. Navigate to a page with a list view that uses a custom function
  2. Navigate to a page with a list view that uses a standard function
  3. 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

  1. Customize the standard doSingleClick function to extend it. For example, the function also fires an AJAX call.

Create AJAX doSingleClick function

  1. 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:

Rename AJAX doSingleClick function

Tags

Pega Platform 4.2 SP6 Reporting Financial Services Healthcare and Life Sciences Insurance Communications and Media Government Healthcare and Life Sciences Consumer Services Consumer Services Manufacturing Consumer Services

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us