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
Add user properties to the applet:
Open Siebel Tools.
For more information, see Using Siebel Tools.
In the Object Explorer, click Applet.
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.
In the Object Explorer, expand the Applet tree, and then click Applet User Prop.
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.
(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.
Compile your modifications.
Modify the presentation model:
Use a JavaScript editor to open your custom presentation model file that Siebel Open UI will use to display the applet that you modified in Step 1.
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.
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)
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.
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.