Configuring Siebel Open UI > Customizing Siebel Open UI > Customizing Events >

Stopping Siebel Open UI From Calling Event Handlers


You can configure the AttachEventHandler method to stop calling event handlers at any point during the event handling process. The example in this topic assumes your configuration includes one predefined event handler and three custom event handlers, and that custom_event_handler_2 stops the processing according to a condition.

To stop Siebel Open UI from calling event handlers

  • Use the following code:

    this.AddMethod("custom_event_handler_2", function(param1, param2, returnStructure){
      if(condition){
        returnStructure[consts.get("SWE_EXTN_CANCEL_ORIG_OP") ] = true;
        returnStructure[consts.get("SWE_EXTN_STOP_PROP_OP") ] = true;
        returnStructure[consts.get("SWE_EXTN_RETVAL") ] = return_value;
      }
    });
    this.AttachEventHandler("event_name", "custom_event_handler_2");

    where:

    • consts references SiebelApp.Constants.
    • return_value contains a value that Siebel Open UI returns to the object that called OnControlEvent.

This code does the following work:

  • Sets the SWE_EXTN_CANCEL_ORIG_OP and SWE_EXTN_STOP_PROP_OP properties according to a condition.
  • Stops event handlers from running.
  • Uses SWE_EXTN_RETVAL to return a value to the object that called OnControlEvent.

For more information, see AttachEventHandler Method.

Configuring Siebel Open UI Copyright © 2015, Oracle and/or its affiliates. All rights reserved. Legal Notices.