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

Adding Presentation Model Properties That Siebel Servers Send to Clients


This topic describes how to add presentation model properties that the Siebel Server sends to the client. It includes the following information:

It is strongly recommended that you configure custom presentation model properties only if the predefined presentation model properties do meet your requirements.

Adding Presentation Model Properties That Siebel Servers Send for Applets

This topic describes a general approach to customizing applet user properties for presentation models. The Siebel Server sends these properties to the client.

To add presentation model properties that Siebel Servers send for applets

  1. Add user properties to the applet:
    1. Open Siebel Tools.

      For more information, see Using Siebel Tools.

    2. In the Object Explorer, click Applet.
    3. In the Applets list, query the Name property for the applet that you must modify.

      For example, query the Name property for Contact List Applet.

    4. In the Object Explorer, expand the Applet tree, and then click Applet User Prop.
    5. In the Applet User Props list, add the following applet user property.
      Name
      Value

      ClientPMUserPropn

      For example, ClientPMUserProp1

      user_property_name

      You can specify one or more user properties. Siebel Open UI sends these user properties to the presentation model that it uses in the client to display the applet. To specify more than one user property, use a comma and a space to separate each user property name. For example:

      User Property1, User Property2

      Each user property that you specify must exist in the Siebel repository, and each of these user properties must contain a value in the Value property.

    6. (Optional) Specify more ClientPMUserPropn user properties, as necessary.

      You can specify more than one ClientPMUserPropn user property, as necessary. Repeat Step e for each ClientPMUserPropn user property that you require.

    7. Compile your modifications.
  2. Modify the presentation model:
    1. Use a JavaScript editor to open your custom presentation model file that Siebel Open UI uses to display the applet that you modified in Step 1.
    2. If your custom presentation model does not override the Setup method, then configure Siebel Open UI to do this override.

      For more information about how to configure an override, see "Process of Customizing the Presentation Model.

    3. Locate the following section of code:

    presentation_model.Setup(propSet)

    For example, if the class name is CustomPM, then locate the following code:

    CustomPM.prototype.Setup = function (propSet)

    1. Add the following code to the section that you located in Step c:

    var consts = SiebelJS.Dependency("SiebelApp.Constants");
    var apm = propSet.GetChildByType(consts.get("SWE_APPLET_PM_PS"));

    where:

    • SWE_APPLET_PM_PS is a predefined constant that Siebel Open UI uses to get the presentation model properties that it uses to display the applet. The Siebel Server sends these properties in a property set.
    1. Add the following code anywhere in the presentation model:

    var value = apm.GetProperty("user_property_name")

    For example:

    var value = apm.GetProperty("User Property1")

    You must configure Siebel Open UI so that it runs the Setup method that you specify in Step c before it encounters the code that you add in Step e.

Adding Presentation Model Properties That Siebel Servers Send for Views

This topic describes how to customize view user properties for presentation models. The Siebel Server sends these properties to the client.

To add presentation model properties that Siebel Servers send for views

  1. Add user properties to the view:
    1. Open Siebel Tools.

      For more information, see Using Siebel Tools.

    2. In the Object Explorer, click View.
    3. In the Views list, query the Name property for the view that you must modify.

      For example, query the Name property for Contact List View.

    4. In the Object Explorer, expand the View tree, and then click View User Prop.
    5. Do Step e through Step g, except add view user properties to a view instead of adding applet user properties to an applet.
  2. If your custom view presentation model does not override the Setup method, then configure Siebel Open UI to do this override:

    Do Step 2 except use vpm instead of apm:

    1. Use a JavaScript editor to open the presentation model file that Siebel Open UI uses to display the view that you modified in Step 1.
    2. Add the following code:

    var consts = SiebelJS.Dependency("SiebelApp.Constants");
    var vpm = propSet.GetChildByType(consts.get("SWE_VIEW_PM_PS"));

    where:

    • SWE_VIEW_PM_PS is a predefined constant that Siebel Open UI uses to get the presentation model properties that it uses to display the view. The Siebel Server sends these properties in a property set.
    1. Add the following code:

    var value = vpm.GetProperty("user_property_name")

    For example:

    var value = vpm.GetProperty("User Property1")

    For more information about how to configure an override, see Process of Customizing the Presentation Model.

Customizing Control User Properties for Presentation Models

This topic describes how to customize control user properties for a presentation model.

To customize control user properties for presentation models

  1. Add user properties to the control:
    1. Open Siebel Tools.

      For more information, see Using Siebel Tools.

    2. In the Object Explorer, click Applet.
    3. In the Applets list, query the Name property for the applet that you must modify.

      For example, query the Name property for Contact List Applet.

    4. In the Object Explorer, expand the Applet tree, and then Control.
    5. In the Controls list, query the Name property for the control that you must modify.

      For example, query the Name property for NewRecord.

    6. In the Object Explorer, expand the Control tree, and then click Control User Prop.
    7. In the Control User Props list, Do Step e through Step g, except add control user properties to the control instead of adding applet user properties to an applet.
  2. Modify the custom presentation model of the applet where the control resides:
    1. Configure Siebel Open UI to get the control object. You can do one of the following:
      • Use the following code to get the control object from the GetControls presentation model property:

    var controls = this.Get("GetControls");
    for (var control in controls){
      var cpm = control.GetPMPropSet(consts.get("SWE_CTRL_PM_PS"));
      // Do something with cpm
    }

    • Use the following the GetControl method to get an instance of the Account Name control:

    var myControl = this.GetControl ("Account Name");
    var cpm = control.GetPMPropSet(consts.get("SWE_CTRL_PM_PS"));

    1. Add the following code:

    var consts = SiebelJS.Dependency("SiebelApp.Constants");
    var cpm = control.GetPMPropSet(consts.get("SWE_CTRL_PM_PS"));

    where:

    • GetPMPropSet is a method that gets the property set for this control. For more information, see GetPMPropSet Method.
    • SWE_CTRL_PM_PS is a predefined constant that Siebel Open UI uses to get the presentation model that it uses for the control object. The Siebel Server sends these properties in a property set.
    1. Add the following code:

    var value = cpm.GetProperty("user_property_name")

    For example:

    var value = cpm.GetProperty("User Property1")

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