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 1, Step e through Step g, in the topic Adding Presentation Model Properties That Siebel Servers Send for Applets, 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:

    Note: This step can also be accomplished using a plug-in wrapper written for customizing the control.
    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:

        SiebelApp.S_App.GetActiveView().GetApplet(<Name of the Applet>).GetControl(<Control Name>);
        var cpm = myControl.GetPMPropSet(consts.get("SWE_CTRL_PM_PS"));
        
    2. 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.

    3. Add the following code:

      var value = cpm.GetProperty("user_property_name")
      

      For example:

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