Bookshelf Home | Contents | Index | PDF | ![]() ![]() |
Configuring Siebel Open UI > Application Programming Interface > Methods of the Siebel Open UI Application Programming Interface > Presentation Model Class for AppletsThis topic describes the methods that Siebel Open UI uses with the presentation models that it uses to display applets. It includes the following information:
Siebel Open UI uses the PresentationModel class to define the presentation models that it uses to display applets. For more information about this class, see Presentation Model Class. Table 34 lists the methods that you can use with the presentation model that Siebel Open UI uses for a predefined applet. You cannot configure Siebel Open UI to customize or override any of these methods except for the PostExecute method. You can configure Siebel Open UI to customize the PostExecute method. Table 35 lists the properties of the presentation model that Siebel Open UI uses for applets.
You add code for some methods to the section of code in the physical renderer that binds the control to the presentation model. For example, if you must customize code for a currency calculator control, then you modify the code in the physical renderer that binds the currency calculator control to the presentation model. This appendix indicates the methods that must use this configuration. The CanInvokeMethod method that Siebel Open UI uses for presentation models determines whether or not Siebel Open UI can invoke a method. It returns one of the following values:
For example, you can add the following code in a physical renderer to determine whether or not Siebel Open UI can call the method that method_name specifies, and if it can call this method on the control that control specifies: var controlSet = this.GetPM().Get("GetControls"); To avoid an error on the Siebel Server, it is recommended that you configure Siebel Open UI to use CanInvokeMethod immediately before it uses InvokeMethod to make sure it can call the method. For information about the CanInvokeMethod method that Siebel Open UI uses for application models, see CanInvokeMethod Method for Application Models,. For more examples that use CanInvokeMethod, see the following topics:
The CanNavigate method determines whether or not the user can navigate a control. It returns one of the following values: CanNavigate(activeControl.GetFieldName()) For example, the following code uses the CanNavigate method to set up a variable named canNavigate: var controlSet = this.GetPM().Get("GetControls"); The following example identifies the controls in a set of controls that reside in an applet proxy. You can then use the value that CanNavigate returns to determine whether or not Siebel Open UI can render a control as a link: var controlSet = this.GetPM().Get("GetControls"); The CanUpdate method determines whether or not Siebel Open UI can update a control. It returns one of the following values: The following example identifies the controls that exist in a set of controls that reside in an applet proxy. You can then use the value that CanUpdate returns to write custom code in the physical renderer that modifies a control that Siebel Open UI can update: var controlSet = this.GetPM().Get("GetControls"); For an example that uses the CanUpdate method, see UpdateRecord Method. The ExecuteMethod method runs a method that is available in the presentation model. It returns nothing. It uses the following syntax: ExecuteMethod("method_name",arguments);
For examples that use ExecuteMethod, see the following topics:
For information about how Siebel Open UI uses the ExecuteMethod method, see How Siebel Open UI Uses the Init Method of the Presentation Model. The ExecuteUIUpdate method updates objects in the user interface. It uses the following syntax: For example, the following code in the applicationcontext.js file updates objects that reside in the current applet: You can configure Siebel Open UI to call the ExecuteUIUpdate method in the following ways:
For information about where you add this code, see Adding Code to the Physical Renderer. The FieldChange method that Siebel Open UI uses with presentation models modifies the value of a field. It returns nothing. It uses the following syntax: FieldChange(control, field_value) For example, you can add the following code to the physical renderer: this.GetPM().AttachPMBinding("FieldChange", function(control,field_value ){
The FocusFirstControl method sets the focus on the first control that the presentation model displays. It uses the following syntax: You can add the following code to the physical renderer: this.GetPM().AttachPMBinding("FocusFirstControl", function(){
For information about where you add this code, see Adding Code to the Physical Renderer. The GetControl method returns a control instance. It uses the following syntax: You add this code to the physical renderer. For examples that use GetControl, see the following topics:
The GetControlId method gets the control ID of a toggle applet. It uses the following syntax: For example, the following code gets the control ID of the toggle applet that Siebel Open UI currently displays in the client. This code resides in the applet.js file: return this.GetToggleApplet().GetControlId(); You can add the following code to the physical renderer: var ToggleEl = this.GetPM().ExecuteMethod("GetControlId"); For information about where you add this code, see Adding Code to the Physical Renderer. The GetFieldValue method returns the value of a field. It uses the following syntax: this.GetFieldValue(field_ame); For example, the following code gets the current value of the Call Status field: pBusComp.GetFieldValue("Call Status"); For another example that uses the GetFieldValue method, see Text Copy of Code That Does a Partial Refresh for the Presentation Model. The GetFormattedFieldValue method gets the format that a field uses to store the value of a control. It uses the following syntax: value = this.GetPM().ExecuteMethod("GetFormattedFieldValue", control_name, flag,index);
For an example that uses the GetFormattedFieldValue method, see Overriding Predefined Methods in Presentation Models. You add the GetFormattedFieldValue method to the physical renderer. Siebel Open UI gets the format according to the locale object. For example, 1000 is an unformatted value, and 1,000 is a formatted value. The GetPhysicalControlValue method gets the value of a physical control. It uses the following syntax: GetPhysicalControlValue (control); For example, the following code gets the value of the physical control that this.GetRenderer().GetPhysicalControlValue(control); The following example binds the physical renderer to the presentation model. You add this code to the physical renderer: this.AttachPMBinding("GetPhysicalControlValue", function(control){
The InvokeMethod method that Siebel Open UI uses for presentation models calls a method on the applet proxy. It is similar to the InvokeMethod method that Siebel Open UI uses for application models. For more information, see InvokeMethod Method for Application Models. The InvokeStateChange method invokes a state change. It allows you to configure Siebel Open UI to handle updates. Siebel Open UI calls it when it sends a can invoke notification update from the Siebel Server. The InvokeStateChange method uses the following syntax: You can add the following code to the physical renderer: this.GetPM().AttachPMBinding("InvokeStateChange", function(){
For information about where you add this code, see Adding Code to the Physical Renderer,. For more information about using this method, see Life Cycle Flows of User Interface Elements. The IsPrivateField method determines whether or not a field is private. A private field is a type of field that only allows the record owner to view the record. For more information about private fields, see Siebel Object Types Reference. The IsPrivateField method returns one of the following values:
this.IsPrivateField(control.GetName()) You add the following code in the physical renderer: var bPvtField = this.GetPM().ExecuteMethod("IsPrivateField", control.GetName()); The LeaveField method determines whether or not Siebel Open UI has removed the focus from a field in an applet. It returns one of the following values:
LeaveField(control,value,do_not_leave);
For examples that use the LeaveField method, see Customizing the Presentation Model to Identify the Records to Delete and Customizing Methods in the Presentation Model to Store Field Values. For more information about using this method, see Life Cycle Flows of User Interface Elements. The NewFileAttachment method returns the properties of a file attachment. It uses the following syntax: var attdata = this.GetPM().ExecuteMethod ("NewFileAttachment"); The PostExecute method runs in the presentation model after the InvokeMethod method finishes running. Siebel Open UI calls the InvokeMethod method, returns the call from the Siebel Server, and then runs PostExecute. The PostExecute method uses the following syntax: PostExecute(cmd, inputPS, menuPS, lpcsa); You add this code in the presentation model: this.AddMethod("PostExecute", function(method_name, input_property_set, {sequence : true, scope : this});
For an example that uses the PostExecute method, see Registering Methods to Make Sure Siebel Open UI Runs Them in the Correct Sequence. For more information about using this method, see AttachPostProxyExecuteBinding Method and Life Cycle Flows of User Interface Elements. The ProcessCancelQueryPopup method cancels a query dialog box if the user clicks Cancel in this dialog box. It uses the following syntax: You can add the following code to the physical renderer: this.GetPM().AttachPMBinding ("ProcessCancelQueryPopup", function(){custom_code}, {scope : this}); For information about where you add this code, see Adding Code to the Physical Renderer. The RefreshData method is proxy method that Siebel Open UI calls when it refreshes an applet in the client according to data that the applet proxy contains. It returns nothing. It uses the following syntax: For example, the following code refreshes the current applet. It resides in the applet.js file: You can add the following code to the physical renderer: this.GetPM().AttachPMBinding("RefreshData", function(value){
For information about where you add this code, see Adding Code to the Physical Renderer. For more information about using this method, see Life Cycle Flows of User Interface Elements. The ResetAppletState method sets the applet to an active state if this applet is not active. It uses the following syntax: oldActiveApplet.ResetAppletState(); To use the ResetAppletState method, you bind the physical renderer to the presentation model. The following example binds the physical renderer to the presentation model. You add this code to the physical renderer: this.GetPM().AttachPMBinding("ResetAppletState", function(){ The SetActiveControl method sets the active property of a control in an applet. It returns nothing. It uses the following syntax: this.ExecuteMethod("SetActiveControl", control_name); The following code in the presentation model sets the active control to null so that the applet contains no active control: this.ExecuteMethod("SetActiveControl", null); For examples that use the SetActiveControl method, see the following topics:
The predefined Siebel Open UI code handles an active control for the applet, so it is recommended that you do not configure Siebel Open UI to directly call the SetActiveControl method. You can use SetActiveControl only in the context of another call that Siebel Open UI makes to an applet control. The SetHighlightState method sets the highlight for the active applet. It uses the following syntax: SetHighlightState(isActive, newActiveApplet) this.SetHighlightState(isActive); You can add the following code to the physical renderer: this.AttachPMBinding("SetHighlightState", function(isActive, newActiveApplet){ For information about where you add this code, see Adding Code to the Physical Renderer. For more information about using this method, see Life Cycle Flows of User Interface Elements. Siebel Open UI calls the SetUpdateConditionals method when the Siebel Server sends change selection information or Can Invoke method notifications to the client. It uses the following syntax: this.SetUpdateConditionals(condition); For example, the following code resides in the applet.js file: this.SetUpdateConditionals(true); You can add the following code in the physical renderer to the end of the UpdateConditionals method. This placement makes sure Siebel Open UI runs UpdateConditionals before it runs SetUpdateConditionals: this.GetPM().ExecuteMethod("SetUpdateConditionals", false); For more information, see Notifications That Siebel Open UI Supports. The ShowPickPopup method displays the currency pick applet when the user clicks a pick icon in a currency calculator control. It uses the following syntax: For example, the applet.js file includes the following code: return this.GetCurrencyApplet().ShowPickPopup(this); You can use the following code: this.GetPM().ExecuteMethod("ShowPickPopup"); The ShowPopup method displays a dialog box for a calculator control, date control, or date-time control. It uses the following syntax: For example, the applet.js file includes the following code: You can add the following code to the physical renderer: this.GetPM().AttachPMBinding ("ShowPopup", function(control){predefined_code;
The ShowSelection method makes a record the active record. It does not return any values. It uses the following syntax: For example, the pmodel.js file includes the following code: this.GetApplet(strAppletName).ShowSelection(); It uses the following code to bind the presentation model in the physical renderer: this.GetPM().AttachPMBinding("ShowSelection", function(){custom_code});
For examples that use the ShowSelection method, see Text Copy of Code That Does a Partial Refresh for the Presentation Model and Example of Adding a New Method. For more information about using this method, see Life Cycle Flows of User Interface Elements. The UpdateAppletMessage method updates an applet message according to modifications that exist on the Siebel Server. It uses the following syntax: For example, the applet.js file includes the following code: You add the following code to the physical renderer: this.GetPM().AttachPMBinding ("UpdateAppletMessage", function(){custom_code}, {scope:this}); //e.g. UpdateAppletMessageUI in phyrenderer. For information about where you add this code, see Adding Code to the Physical Renderer. For more information about using this method, see Life Cycle Flows of User Interface Elements. The UpdateConditionals method runs when Siebel Open UI displays an applet. It uses the following syntax: For example, the listapplet.js file contains the following code: You can add the following code to the code that updates the physical properties and the HTML properties of the control: this.GetPM().AttachPMBinding ("UpdateConditionals", function(){custom_code},{scope : this});
For information about where you add this code, see Adding Code to the Physical Renderer. The UpdateCurrencyCalcInfo method updates information that Siebel Open UI uses for a currency calculation. Siebel Open UI calls it when it sends currency information from the Siebel Server. You can use it to display currency information in an applet. It uses the following syntax: UpdateCurrencyCalcInfo(0,args) For example, the applet.js file contains the following code: this.UpdateCurrencyCalcInfo(0,args); You can add the following code to the InvokeCurrencyApplet method of the physical renderer: this.GetPM().AttachPMBinding ("UpdateCurrencyCalcInfo", function(){custom_code} , {scope : this}}); For information about where you add this code, see Adding Code to the Physical Renderer. The UpdateQuickPickInfo method updates List of Values (LOV) information. Siebel Open UI calls it when it sends LOV information from the Siebel Server to the client. It uses the following syntax: UpdateQuickPickInfo(field, true, arrValues, 0); this.UpdateQuickPickInfo(field, true, arrValues, 0); You can add the following code to the physical renderer: this.GetPM().AttachPMBinding ("UpdateQuickPickInfo", function(){custom_code}, {scope:this}); For information about where you add this code, see Adding Code to the Physical Renderer. For more information about using this method, see Life Cycle Flows of User Interface Elements. The UpdateStateChange method handles notification updates. Siebel Open UI calls it when it sends notification updates from the Siebel Server. It uses the following syntax: You can add the following code to the physical renderer: this.GetPM().AttachPMBinding("UpdateStateChange", function(){
For information about where you add this code, see Adding Code to the Physical Renderer. For more information about using this method, see Life Cycle Flows of User Interface Elements and Notifications That Siebel Open UI Supports. |
![]() ![]() |
Configuring Siebel Open UI | Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Legal Notices. | |