Bookshelf Home | Contents | Index | PDF |
Siebel Object Interfaces Reference > Siebel Object Interfaces Reference > Object Interfaces Reference > Applet EventsThis topic describes applet events. It includes the following topics:
Overview of Applet EventsSiebel CRM calls an applet event in reply to a user interaction. You can manage each event for each applet. You can use an applet event only in high interactivity mode. The format for an applet event that you use on the browser is Applet_event. For example, Applet_ChangeFieldValue. If the event includes the Applet prefix, then you can use it only on the browser. The format for an applet event that you use on the Siebel Server is WebApplet_event. For example, WebApplet_InvokeMethod. If the event includes the WebApplet prefix, then you can use it only on the Siebel Server. Applet_ChangeFieldValue EventThe Applet_ChangeFieldValue event starts if the user uses an applet to modify data in a field. It does not return any information. For more information, see Applet_ChangeRecord Event. FormatApplet_ChangefieldValue(fieldname, fieldValue) Table 24 describes the arguments for the Applet_ChangeFieldValue event.
UsageNote the following usage of the Applet_ChangeFieldValue event:
Used WithExamplesThe following example is in Browser Script: function Applet_ChangeFieldValue (field, value) Applet_ChangeRecord EventSiebel CRM calls the Applet_ChangeRecord event if the user moves to a different record or view. It does not return any information. For more information, see Applet_ChangeFieldValue Event. FormatUsed WithYou use the Applet_ChangeRecord event with Browser Script. Note the following:
ExamplesThe following example is in Browser Script: function Applet_ChangeRecord () Applet_InvokeMethod EventThe Applet_InvokeMethod event can start if any of the following items occur:
For more information, see About Specialized and Custom Methods. This method does not return any information. FormatApplet_InvokeMethod(name, inputPropSet) Table 25 describes the arguments for the Applet_InvokeMethod event.
UsageThis method sends information you specify in the inputPropSet argument to the PreInvokeMethod event. You can use the Applet_InvokeMethod event to display or hide controls, or to set a search specification. To access a business component from this event handler, do the following: Used WithExamplesSome methods can create, modify, or delete records. These actions might call an event at the applet or business component level. If you require Siebel CRM to perform a specific action before or after the method run, then you can use these events. The following example includes custom code in the PreInvokeMethod event and the InvokeMethod applet event. For more information, see Applet_PreInvokeMethod Event. To set the fields, this code sets and resets the flag and uses the NewRecord server event: function Applet_PreInvokeMethod (name, inputPropSet) return ("ContinueOperation"); function Applet_InvokeMethod (name, inputPropSet) function BusComp_NewRecord () Applet_Load EventSiebel CRM calls the Applet_Load event after it loads an applet and displays the data for that applet. It does not return any information. FormatUsageTo hide or manipulate controls or to set properties on an ActiveX Control in a form applet, you can use the Applet_Load event. You can manipulate the following types of controls: If you must display a dialog box, then do not use the SWEAlert method or the RaiseErrorText method with the Applet_Load event. This technique can cause the browser to fail if Siebel CRM has not fully rendered the Siebel application in the browser. Used WithExamplesYou can use the following example only with code on a form applet: function Applet_Load () // Hide the control // Hide the label Applet_PreInvokeMethod EventSiebel CRM calls the Applet_PreInvokeMethod event immediately before it calls a specialized method on an applet. The Applet_PreInvokeMethod event can start if any of the following items occur:
This event returns ContinueOperation or CancelOperation. For more information, see Caution About Using the Cancel Operation Event Handler. For more information, see About Specialized and Custom Methods. FormatApplet_PreInvokeMethod(name, inputPropSet) The arguments you use with this format are the same as the arguments described in Table 25. Used WithExamplesfunction Applet_PreInvokeMethod (name, inputPropSet) WebApplet_InvokeMethod EventSiebel CRM calls the WebApplet_InvokeMethod event after a specialized method on the Web applet runs. WebApplet_InvokeMethod starts only for a predefined method. It does not start for a custom method. For more information, see About Specialized and Custom Methods. This method does not return any information. FormatWebApplet_InvokeMethod(methodName) Table 26 describes the arguments for the WebApplet_InvokeMethod event.
Used WithExamplesThe following example is in Siebel eScript: switch (MethodName) The following example is in Siebel VB: Select Case MethodName Related TopicsFor more information, see the following topics: WebApplet_Load EventSiebel CRM calls the WebApplet_Load event immediately after it loads an applet. It does not return any information. FormatUsageTo avoid returning a null value, do not call TheApplication.ActiveBusObject from the WebApplet_Load event. Instead, you can use this.BusObject to get a reference to the current business object. Used WithExamplesThe following example is in Siebel eScript: function WebApplet_Load () The following example is in Siebel VB: Sub WebApplet_Load Related TopicsFor more information, see the following topics: WebApplet_PreCanInvokeMethod EventThe WebApplet_PreCanInvokeMethod event allows a script to determine if the user possesses the authority to call the applet method. Siebel CRM calls this method in the following situations:
This method returns CancelOperation or ContinueOperation. For more information, see Caution About Using the Cancel Operation Event Handler. FormatWebApplet_PreCanInvokeMethod(MethodName, &CanInvoke) Table 27 describes the arguments for the WebApplet_PreCanInvokeMethod event. UsageUsing the FirstSelected business component method with the PreCanInvokeMethod event can cause unexpected behavior in a pick applet that Siebel CRM calls from the applet where this event is called. To enable and disable a method, it can be easier to use the CanInvokeMethod applet user property at the applet level. For an example, see Using a MiniButton Control to Call a Custom Method. For information about the CanInvokeMethod user property, see Siebel Developer's Reference. Used WithExamplesThe following example is in Siebel eScript: function WebApplet_PreCanInvokeMethod (MethodName, &CanInvoke) The following example is in Siebel VB: Function WebApplet_PreCanInvokeMethod (MethodName As String, CanInvoke As String) As Integer WebApplet_PreInvokeMethod EventSiebel CRM calls the WebApplet_PreInvokeMethod event before it calls any of the following:
This method returns ContinueOperation or CancelOperation. For more information, see Caution About Using the Cancel Operation Event Handler. For more information, see About Specialized and Custom Methods. FormatWebApplet_PreInvokeMethod(methodName) The arguments you can use with this format are the same as the arguments described in Table 26. Used WithExamplesThe following example is in Siebel eScript: function WebApplet_PreInvokeMethod (MethodName) The following example is in Siebel VB: Function WebApplet_PreInvokeMethod (MethodName As String) As Integer WebApplet_ShowControl EventThe WebApplet_ShowControl event allows a script to modify the HTML that the Siebel Web Engine creates when it renders a control on a Web page in a Siebel application that runs in standard interactivity mode. You can use the WebApplet_ShowControl event only in a Siebel application that runs in standard interactivity mode. This event does not return any information. FormatWebApplet_ShowControl (controlName, property, mode, HTML) Table 28 describes the arguments for the WebApplet_ShowControl event. Usage of the WebApplet_ShowControl EventThe HTML that the Siebel Web Engine creates depends on the following items: The script can modify the value of the HTML argument. The Siebel Web Engine sends the modified value back to the Web browser. To render the layout of an applet, Siebel CRM uses a Siebel Web Template (.swt) file. These files are HTML files that contain special variable tags that indicate where to render a control. To render the controls on the Web page, the Siebel Web Engine converts swe tags to HTML. Siebel CRM calls the WebApplet_ShowControl event for each swe tag after the Siebel Web Engine creates the HTML to render the control, but before it sends the created HTML back to the browser. This technique allows the scripts to modify this HTML before Siebel CRM displays it. To display a control, you can include swe:control variable tags in the following ways:
Used WithExamplesThis Siebel eScript script displays negative amounts in red in a read-only form: function WebApplet_ShowControl (ControlName, Property, Mode, &HTML) WebApplet_ShowListColumn EventThis event allows a script to modify the HTML that the Siebel Web Engine creates when it renders a list column on a Web page in a Siebel application that runs in standard interactivity mode. You can use the WebApplet_ShowListColumn event only in a Siebel application that runs in standard interactivity. This event does not return any information. FormatWebApplet_ShowListColumn (columnName, property, mode, HTML) Table 29 describes the arguments for the WebApplet_ShowListColumn event.
UsageUsage for the WebApplet_ShowListColumn event is very similar to usage for the WebApplet_ShowControl event, except Siebel CRM uses a list column ID that is mapped to a list column in an applet. For more information, see Usage of the WebApplet_ShowControl Event. Used WithExampleThis Siebel VB script displays negative amounts in a list in red font color: Sub WebApplet_ShowListColumn (ColumnName As String, Property As String, Mode As String, HTML As String) Dim amount as Double The following example is in Siebel eScript: function WebApplet_ShowListColumn (ColumnName, Property, Mode, &HTML) |
Siebel Object Interfaces Reference | Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Legal Notices. | |