Bookshelf Home | Contents | Index | PDF | ![]() ![]() |
Configuring Siebel Open UI > Application Programming Interface > Methods of the Siebel Open UI Application Programming Interface > Physical Renderer ClassThis topic describes the methods that Siebel Open UI uses with the PhysicalRenderer class. It includes the following information:
The BindData method downloads metadata and data from the Siebel Server to the client proxy, and then binds this data to the user interface. The list columns that a list applet uses is an example of metadata, and the record set that this list applet uses is an example of data. The BindData method uses the following syntax: BindData(searchData, options); For example, the following code in the renderer.js file uses the BindData method: this.GetSearchCtrl().BindData(searchData, options); For another example, the following code gets the value for a control from the presentation model, and then binds this value to this control: CustomPR.prototype.BindData = function(){ var controlSet = pm.Get("GetControls"); for(var controlName in controlSet){ if(controlSet.hasOwnProperty(controlName)){ var control = controlSet[controlName]; // Get value for this control from presentation model and bind it to Siebel Open UI expects the physical renderer to use the BindData method to bind data to the physical control. The BindData method also gets the initial value from the presentation model, and then attaches this value to the control.
The BindEvents method binds an event. It returns nothing. It uses the following syntax: BindEvents(this.GetProxy().GetControls()); For example, the following code in the renderer.js file uses the BindEvents method: this.GetConcreteRenderer().BindEvents(this.GetProxy().GetControls()); For another example, the following code binds a resize event: CustomPR.prototype.BindEvents = function(){ var controlSet = controls||this.GetPM().Get("GetControls"); for(var control in controlSet){ if(controlSet.hasOwnProperty(control)){ // Bind for each control as required. $(window).bind("resize.CustomPR", OnResize, this); Siebel Open UI expects the physical renderer to use the ShowUI method to do all possible event binding. The event can reside on an applet control or in the applet area of the DOM. This binding also applies to any custom event, such as resizing a window. For more information, see ShowUI Method and Siebel CRM Events That You Can Use to Customize Siebel Open UI. For information about how Siebel Open UI uses BindEvents, see the following topics:
The EnableControl method enables a control. It uses the following syntax: The EndLife method ends an event. It returns nothing. It uses the following syntax: It includes the following arguments: CustomPR.prototype.EndLife = function(){ $(object).unbind ("event.CustomPR"); It is recommended that you configure Siebel Open UI to end the life of any event that it no longer requires. This configuration makes sure an event handler does not continue to exist even if no object references it. For example, assume you attached a resize event on a window, and then Siebel Open UI finished running this event. The following code ends the resize event on the window object: CustomPR.prototype.EndLife = function(){ $(window).unbind ("resize.CustomPR"); For information about how Siebel Open UI uses EndLife, see the following topics:
The FieldChange method that Siebel Open UI uses with physical renderers modifies the value of a field. It returns nothing. It uses the following syntax. You add this code to the constructor method in the physical renderer: this.GetPM().AttachPMBinding("FieldChange", this.SetControlValue, {scope: this} For example, you can add the following code to the constructor method that resides in the physical renderer: this.GetPM().AttachPMBinding("FieldChange", this.SetControlValue, {scope: this} This code adds the following code to the BinderMethod that resides in the physical renderer: CustomPR.prototype.SetControlValue = function(control, value){ Siebel Open UI finishes running the FieldChange method, and then calls the SetControlValue method that sets the value in the physical instance of the control. For more information, see AttachPMBinding Method. For information about the FieldChange method that Siebel Open UI uses with presentation models, including examples that use FieldChange, see FieldChange Method for Presentation Models. The GetPM method returns a presentation model instance. It uses the following syntax: For example, the jqmlistrenderer.js file includes the following code: var listOfColumns = this.GetPM().Get("ListOfColumns");
The SetControlValue method sets the value for the control that Siebel Open UI sends as an argument. For an example that uses SetControlValue, see FieldChange Method for Physical Renderers. For more information about using this method, see Life Cycle Flows of User Interface Elements. The ShowUI method displays the physical control that corresponds to an applet control. It returns nothing. It uses the following syntax: CustomPR.prototype.ShowUI = function(){ var controlSet = this.GetPM().Get("GetControls"); for(var control in controlSet){ if(controlSet.hasOwnProperty(control)){ // Display each control, as required. A physical renderer must provide a definition for each of the following methods: It can do this definition in each of these methods or in a superclass, which is a parent class of the class that the method references. |
![]() ![]() |
Configuring Siebel Open UI | Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Legal Notices. | |