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

Setting Up the Physical Renderer


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

Figure 24 illustrates the code you use to set up the physical renderer. Each number in this figure identifies the corresponding step number in the numbered task list that this book includes immediately after this figure.

Figure 24. Setting Up the Physical Renderer

To set up the physical renderer

  1. Download a copy of the recyclebinrenderer.js file to the following folder:

    CLIENT_HOME\SWEApp\PUBLIC\language_code\files\custom

    It is recommended that you get a copy of this file to assist in your understanding of how to implement the example that this topic describes. This file includes all the code that this example uses. It also includes more comments that describe code functionality. To get a copy of this file, see Article ID 1494998.1 on My Oracle Support.

    For more information about the folders you can use to store your customizations, see Organizing Files That You Customize.

  2. Use a JavaScript editor to open the recyclebinpmodel.js file that you downloaded in Step 1.
  3. Verify that the RecycleBinRenderer class does not exist and that you do not configure Siebel Open UI to override this class:

    if(typeof(SiebelAppFacade.RecycleBinRenderer) === "undefined"){

  4. To prevent potential conflicts, create a namespace that Siebel Open UI can use:

    SiebelJS.Namespace("SiebelAppFacade.RecycleBinRenderer");

  5. Use the Define method to identify the physical renderer file:

    define("siebel/custom/recyclebinrenderer", ["3rdParty/jcarousel/lib/jquery.jcarousel.min", "siebel/jqgridrenderer"], function () {

    You must use the Define method to make Siebel Open UI can identify the constructor. You must include the relative path and the name of the presentation model file without the file name extension. For more information, see Define Method.

  6. Define the class:

    SiebelAppFacade.RecycleBinRenderer = (function(){

  7. Declare the variables that Siebel Open UI uses throughout the physical renderer code:

    var siebConsts = SiebelJS.Dependency("SiebelApp.Constants");

  8. Create the class constructor:

    function RecycleBinRenderer(pm){
      SiebelAppFacade.RecycleBinRenderer.superclass.constructor.call(this, pm);
      this.listOfCols = ["Name", "Location"];
    }

  9. Define the inheritance chain:

    SiebelJS.Extend(RecycleBinRenderer, SiebelAppFacade.JQGridRenderer);

    For more information about inheritance chains, see About Dependency Injection.

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