Bookshelf Home | Contents | Index | PDF |
Siebel Object Interfaces Reference > Siebel Object Interfaces Reference > Object Interfaces Reference > Control MethodsThis topic describes control methods. It includes the following topics:
In this topic, the controlVar variable indicates the name of the control that causes Siebel CRM to call the method. For example, Button1_Click. A control method does not work with an ActiveX control. Applet Method for a ControlThe Applet method returns a string that contains the name of the applet that contains the control. FormatUsageGetting the name of the applet that contains the control allows you to configure Siebel CRM to do operations on the applet, not only on the control. Used WithBusComp Method for a ControlThe BusComp method returns a string that contains the name of the business component that an applet references. The control resides in this applet. FormatUsed WithExamplesFor an example, see Name Method for a Business Component. GetProperty Method for a ControlThe GetProperty method returns a string that contains the value of a property. If the property does not exist, then this method returns NULL. FormatcontrolVar.GetProperty(propName) UsageYou can use the GetProperty method with the following controls: You can use the GetProperty method to get values for the following properties: For more information about these properties, see Table 91. To return more than one property, you must use a separate statement for each property. Used WithExamplesThe following example uses the GetProperty method to return values for the FontSize, Background Color, Width, and Height properties: theApplication().SWEAlert("checkbox.FontSize : " + objCheckBox.GetProperty("FontSize")); GetValue Method for a ControlThe GetValue method returns the value that a control displays for the data type of the field that the control references. The type of value depends on the specific control. This method returns the value in a string. The GetValue method cannot return a literal value that a user provides as input to a control. This method returns the value that Siebel CRM stores for the user entry, according to the data type of the field that the control references. FormatUsageFor more information, see Usage for the GetValue Method and the SetValue Method. Used WithExamplesFor an example, see Examples for the GetValue Method and the SetValue Method. Name Method for a ControlThe Name method for a control returns a string that contains the name of a control. FormatUsed WithExamplesFor an example, see Name Method for a Business Component. SetLabelProperty Method for a ControlThe SetLabelProperty method sets the properties of a label. This method does not return any information. FormatcontrolVar.SetLabelProperty(propName, propValue) Table 90 describes the arguments for the SetLabelProperty method.
UsageIf you must set more than one property, then you must use a separate statement for each property. Enabling the SetLabelProperty MethodSiebel CRM does not enable the SetLabelProperty method by default. You must enable it in Siebel Tools before you use it in a script. To enable the SetLabelProperty method
Properties You Can Set For a LabelTable 91 lists the properties you can set for a label. Used WithExamplesThe following code uses the SetLabelProperty method: function Applet_PreInvokeMethod (name, inputPropSet){ // Example of changing the font size of the Location label var ctl = this.FindControl("Location"); // Example of changing the background color of the Location label var ctl = this.FindControl("Location"); // Example of changing the font type of the Location label var ctl = this.FindControl("Location"); // Example of changing the font color of the Location label var ctl = this.FindControl("Location"); SetProperty Method for a ControlThe SetProperty method sets the properties of a control. This method does not return any information. FormatcontrolVar.SetProperty(propName, propValue) Table 92 describes the arguments for the SetProperty method.
UsageYou can use the SetProperty method with the following controls: If you must set more than one property, then you must use a separate statement to set each property. Properties You Can Set for a ControlTable 93 describes the properties you can set for a control.
Used WithUsing the SetProperty Method to Control Font WeightTo use the SetProperty method to control font weight, you must use the FontWeight property. For example: control.SetProperty("FontWeight","600") You cannot use the FontStyle argument to control font weight. For example, the following code fails: control.SetProperty("FontStyle", "Bold") ExamplesThe following code uses the SetProperty method: objCheckBox.SetProperty("FontColor", "#00ff00"); SetValue Method for a ControlThe SetValue method sets the contents a control. This method does not return any information. FormatcontrolVar.SetValue (controlValue) Table 94 describes the arguments for the SetValue method.
Usage for the GetValue Method and the SetValue MethodNote the following usage for the SetValue method:
Note the following usage for the GetValue method and the SetValue method:
Used WithExamples for the GetValue Method and the SetValue MethodThe following code uses the GetValue method and the SetValue method: function Applet_PreInvokeMethod (name, inputPropSet) // Example of changing the value of the Abstract control to uppercase var ctlName = "Abstract"; // Example of changing the value of a checkbox control var ctlName = "Billable Flag"; // Example of changing the value of a date/time control var ctlName = "Agent Committed"; |
Siebel Object Interfaces Reference | Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Legal Notices. | |