Configuring Siebel Open UI > Customizing Siebel Open UI > Doing General Customization Tasks >

Customizing Events


This topic includes some examples that describe how to customize Siebel Open UI to use events. For more information about how Siebel Open UI uses events and examples that configure them, see the following topics:

Refreshing Custom Events

Siebel Open UI does not come predefined to refresh a custom event. The example in this topic describes how to modify this behavior.

To refresh custom events

  1. Add the following code:

    this.AddMethod("RefreshHandler", function(x, y, z){
      // Add code here that does processing for RefreshHandler.
    });

    This code adds the RefreshHandler custom event handler.

  2. Add the following code in the presentation model so that it is aware of the event that the RefreshEventHandler specifies:

    this.AttachEventHandler("Refresh", "RefreshHandler");

    For more information, see AttachEventHandler Method.

  3. Add the following code in the physical renderer:

    controlElement.bind("click", {ctx: this}, function(event){
      event.data.ctx.GetPM().OnControlEvent("Refresh", value1, value2, value3);
      });

    This code binds the physical event to the presentation model. For more information, see OnControlEvent Method.

Overriding Event Handlers

The example in this topic configures Siebel Open UI to override an event handler that the predefined presentation model references.

To override event handlers

  1. Configure Siebel Open UI to refresh a custom event.

    For more information, see Customizing Events.

  2. Add the following code to your custom presentation model:

    this.AddMethod(SiebelApp.Constants.get("PHYEVENT_INVOKE_CONTROL"), function(controlName) {
      // Process button click
      return false;
    });

    This code configures Siebel Open UI to return the following value from the event handler. It makes sure this presentation model does not continue processing:

    false

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