Configuring Siebel Open UI > Example of Customizing Siebel Open UI > Process of Customizing the Presentation Model >

Customizing the Setup Logic of the Presentation Model


This task is a step in Process of Customizing the Presentation Model.

In this topic, you customize the setup logic of the presentation model so that it adds the Selected list column to an applet. You add the control that you configure for this example to the ListColumns list that resides in the client.

Figure 18 illustrates the code you use to customize the setup logic of the presentation model. Each number in this figure identifies the corresponding step number in the numbered task list that this book includes immediately after this figure.

Figure 18. Customizing the Setup Logic of the Presentation Model

To customize the setup logic of the presentation model

  1. In the recyclebinpmodel.js file, identify the property or method of the object that you must modify.

    To do this identification, you can examine methods in the JavaScript API that most closely match the behavior that your example requires. For more information about this JavaScript API, see Siebel Open UI Application Programming Interface.

    You can use the following list as a guide to get you started, depending on the area of the Siebel application that your customization must modify:

    • Application methods. For more information, see Application Model Class.
    • Applet methods. For more information, see Presentation Model Class for Applets.
    • List applet methods. For more information, see Presentation Model Class for List Applets.
    • Applet control methods. For more information, see Applet Control Class.
    • Menu methods. For more information, see Presentation Model Class for Menus.
    • Siebel business service methods. For more information, see Business Service Class.

      In this example, you can examine the presentation model that Siebel Open UI uses for list applets to identify the property or method of the object that you must modify. To identify this property, see Properties of the Presentation Model That Siebel Open UI Uses for List Applets.

      After examining these properties, you find that Siebel Open UI uses the GetListOfColumns method that resides in the presentation model. In general, when you examine a property or method in a list applet, it is recommended that you first examine the list presentation model that a list uses, and then the applet presentation model that a form applet uses.

      You must add the Selected list column to a list applet. The Selected list column is a control that Siebel Open UI displays in the client. So, you add it to the list of listOfColumns that Siebel Open UI already uses.

  2. Specify the method that the presentation model runs as part of the Setup life cycle:

    RecycleBinPModel.prototype.Setup = function(propSet){

    In this example, you configure Siebel Open UI to create a control that it displays only in the client, and then insert it into the GetListOfColumns property of the applet. You add this code in the Setup life cycle method of the presentation model because this logic is related to the work that Siebel Open UI does to create the applet. Siebel Open UI must create the applet first, and then insert the control. For more information, see Summary of Presentation Model Methods.

  3. Create a new instance of the AppletControl object:

    var mycontrol = SiebelApp.S_App.GetAppletControlInstance

    This example requires Siebel Open UI to create a new listOfColumns and add it to the GetListOfColumns array. You can use the GetAppletControlInstance method to create a new instance of the AppletControl object. For more information, see GetAppletControlInstance Method.

  4. Name the instance:

    "Client_Select",

    You must specify a unique name for the instance. This example uses Client_Select, which is a unique value that Siebel Open UI can use to determine the operation that it must perform.

  5. Specify the control type:

    consts.get("SWE_CTRL_CHECKBOX"),
    "Select",
    "Select",
    "50");
    this.Get("GetListOfColumns")["SelectionBox"] = mycontrol;
    SiebelAppFacade.RecycleBinPModel.superclass.Setup.call(this, propSet);
    };

    where:

    • consts.get("SWE_CTRL_CHECKBOX") specifies the control as a checkbox.
    • Select specifies the display name. You can specify any display name.
    • 50 specifies the width of the column.

      For more information about control types, see Applet Control Class.

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