Disabling Default Handler

You can disable the default handler for any action that results in an event being triggered.

For example, you may want to perform some sort of custom function when the user clicks on the Open button on the work item list. You can disable the normal “open” function, subscribe to the Open button event, and perform your custom function — that is, your application must handle the event.

Disabling the default handler can also be used in conjunction with the WCC Application methods to perform a function at a later time. To carry the Open button example from above further, you would disable the default handler for the Open property on the WorkItems component, then subscribe to the List Item Execute (double click) event on the WorkItems component. When the user double-clicks on a work item, you can perform your custom logic, then call the openWorkItem Application method to open the work item. For information about the Application methods you can call to perform a function normally performed by the component, see Application Class Methods.

Procedure

  1. Open the Properties Editor for the component that includes the property corresponding to the functionality whose event you want to disable.
  2. Click on the property that corresponds to the function. For example:

    Notice that when you click on a property that has a corresponding event, the Disable Default Handler check box appears on the Properties Editor dialog.

  3. Click in the Disable Default Handler check box.
  4. Click Commit to save your changes.

    Now when the Open work item event fires, the normal open work item function will not take place.