Configuring Siebel Open UI > Example of Customizing Siebel Open UI > Process of Customizing the Physical Renderer >

Customizing the Event Handlers


This task is a step in Process of Customizing the Physical Renderer.

In this topic, you customize the event handlers that Siebel Open UI uses to handle the state of the restore button, and to handle the event that occurs if the user clicks a record in the recycle bin. You attached these event handlers in Step 3.

To customize the event handlers

  1. In the recyclebinrenderer.js file, add the ShowRestoreButton method to display the restore button:

    function ShowRestoreButton(evt){
      if(evt && evt.currentTarget){
        $(evt.currentTarget).children("a.siebui-citem-add").show();
      }
    }

  2. Add the HideRestoreButton method to hide the restore button:

    function HideRestoreButton(evt){
      if(evt && evt.currentTarget){
        $(evt.currentTarget).children("a.siebui-citem-add").hide();
      }
    }

  3. Add the AddFromRecycleBin method to call the presentation model:

    function AddFromRecycleBin(evt){
      var pm = evt.data.ctx.GetPM();
        if(evt && evt.currentTarget){
          pm.OnControlEvent("RESTORE", $(evt.currentTarget).parent().data("index"));
        }
    }

    The AddFromRecycleBin method uses the OnControlEvent method to call the presentation model. It sends the index of the record that the user requests to restore. For more information, see OnControlEvent Method.

  4. Save the recyclebinrenderer.js file.
Configuring Siebel Open UI Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Legal Notices.